Ok Sup Forums quick question, is it possible to write a program that contains a paradox? How will the computer respond?

Ok Sup Forums quick question, is it possible to write a program that contains a paradox? How will the computer respond?

Other urls found in this thread:

youtu.be/ypgiTy8ZvFo
youtu.be/uqcyDA2L5L0
youtu.be/g1Og5Tg_Jyo
youtu.be/cWvZw1F6qMM
youtu.be/443B6f_4n6k
computer-programming-forum.com/55-prolog/c1c5904b006b71ab.htm
en.wikipedia.org/wiki/Halting_problem
twitter.com/NSFWRedditVideo

A paradox isnot a program.

It will respond however you programmed it to respond when it finds a paradox.

yeah it's called an infinite loop

these are the wrong answers.

the right answer is that there's no way to represent a paradox in memory.

Prove it.

computers don't think. you can't just confuse them

Sure there is!
This is the correct answer.

Try to simulate or replicate a social network with a graph where the vertices are people and edges are friendships between pairs of people. Calculate the average number of friends (the number of edges -- the "degree") of any given vertex. Then calculate the average number of friends the average friend has (friends' degrees). If the network is realistic, you'll find that the average friend's number of friends is greater than the number of friends of any given person. This is a paradox.

int a = calc_avg_friends();
int b = calc_avg_friends_friends();
bool paradox;

if (a < b) {
paradox = true;
if (paradox) {
// Have whatever reaction to the paradox here...
}
}

Computer isn't smart enough to understand a paradox. A computer is dumb.

(Got "connection error" when I tried posting with code tags, so I had to post without. Weird, amirite?)

>Sure there is!
How?

You may be able to represent the paradox indirectly (try to divide by zero or something) but how could you store the result of the division in memory?

This is what I took OP to be asking.

Division by zero is not a paradox; it is an illegal operation that results in an error (just like in math outside of a computer).

>how could you store the result of the division in memory?
As the stack trace of the error! :P

there is no way for a paradox to "exist" outside of a computer so how could a program "contain" a paradox? The question is rather ambiguous.

can you give an example of what you think a paradox is, then?

>...greater than the number of friends of any given person.
the average* number of friends of any given person

>you'll find that the average friend's number of friends is greater than the number of friends of any given person. This is a paradox

okay how is this a paradox? Paradoxes are "true but seemingly contradictory." What is seemingly contradictory about your example? It's mathematically valid. Just because it's unintuitive doesn't mean it's a paradox.

From Wikipedia,

>A paradox is a statement that, despite apparently sound reasoning from true premises, leads to an apparently self-contradictory or logically unacceptable conclusion.[1][2] A paradox involves contradictory yet interrelated elements that exist simultaneously and persist over time.

So, in order for division by zero to be a paradox, it has to have "sound reasoning from true premises" followed by "contradictory yet interrelated elements that exist simultaneously and persist over time". Most people would say that it has neither. It is an operation that makes no sense to start with and has a non-existent (undefined) conclusion. :o

It's like saying that 5 = 4 is a paradox.

#include
main() {
int answer;
answer = 2 + 2;
printf("The answer is %d\n");
return (0);
}

Well, how can the average person have less friends than the average friend? After all, all friends are data points in the sample for "average person".

Paradox is a consequence of poor logic or underspecified terminology, neither is possible in computer. It's a purely half-assed human thing.

something like not all people are data points in the sample for average friend

tomatooo tomatooo.. could someone link the vid?

Race condition or infinite loop or throw an exception depending on how you program it.

Top quality image right there, the woman makes some pretty crazy videos.

You are actually stupid.
>Use math incorrectly
>Don't like the answer
>Claim a paradox when there isn't one

probably your antivirus

youtu.be/ypgiTy8ZvFo

Few other good one's
youtu.be/uqcyDA2L5L0
youtu.be/g1Og5Tg_Jyo
youtu.be/cWvZw1F6qMM

I love these threads, they make me feel good about my intelligence, Sup Forums is so retarded.

She is an artist to the highest degree

$ gcc kek.c
$ ./a.out
The answer is 1259759336
$ ./a.out
The answer is -191847128
$ ./a.out
The answer is 1637922168

Explain plos

You gotta give printf an argument, it just prints shit from memory, you brainlet.

Nice optical illusion, fagonacci.

does this count
youtu.be/443B6f_4n6k

>breaking Hiroshimoot's computer

don't be mean

>Well, how can the average person have less friends than the average friend?
because those aren't the same distribution. the "average friend" samples more from people who have more friendships, hence the average friend has more friends. it's readily apparent if you word it correctly

computer-programming-forum.com/55-prolog/c1c5904b006b71ab.htm
In this instance, the program crashes because it tries to solve it and used too many resources to do so.
But what happened in theory if that program were to be ran on an infinite memory computer?
You need to learn what computability theory is, specifically, the halting problem.
en.wikipedia.org/wiki/Halting_problem

Interesting topic! Thanks annon

A paradox is anything that seems logically reasonable at a glance, but is not when you look at it closely. Any logical flaw are paradoxes, like infinite loops