[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Prove You're Not a Pajeet

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 58
Thread images: 2

File: 1441318876097.jpg (60KB, 1024x448px) Image search: [Google]
1441318876097.jpg
60KB, 1024x448px
By making a program that lists all finite sequences of integers such that each sequence occurs exactly once.
>>
>>57105348
>do my homework for me

go to dpt, they have a raging hardon for that sort of stuff.
>>
And they tell me that CS isn't a meme.

I'm glad I dropped out.
I made some projects and now I'm earning 70k my first year, debt free.
>>
>>57105348
translation:

pajeet, please do my homework
>>
>>57105348
>sequence of integers
prints them with some sort of division between integers? that is, is the sequence 12,3 different from 1,23?
>>
>>57105384

Yes.
>>
>>57105370
135k first year, debt free

of course, I didn't even major in CS, so I probably didn't need to go to college at all
>>
>>57105348
This will never terminate, you know that, right? what are you hoping to gain from this? a program whose logic is sound, but won't be able to run?
>>
>>57105530

Who cares if it won't terminate? That doesn't mean it won't run.
>>
Is it all sequences of integers from an input?
>>
>>57105546
depends how you write it. The logical way to write the code will result in just printing all integers in a sequence of length 1. How insightful is that?
>>
>>57105570

That's the problem, retard. It should be such that every sequence appears after some finite amount of time.
>>
>>57105600
I'm the retard for not guessing about something OP never said?
>>
>>57105623
>>57105600
also, provably impossible. What OP is referring to is just every possible ordering of every element of the power set of the integers. This group is uncountable, meaning it is impossible to enumerate them all, meaning it is impossible to write a program that enumerates them all. No matter what implementation you choose, it will be possible for me to find a sequence k such that your implementation will never enumerate it.
>>
>>57105623

By making a program that lists all finite sequences of integers such that EACH SEQUENCE OCCURS EXACTLY ONCE.
>>
>>57105664
I have a feeling you're the autistic OP, because "each sequence occurs exactly once" does not mean the thing you think it means, and it also is impossible as explained here >>57105662
>>
>>57105662

Fucking retard, the set of all FINITE sequences of integers is not uncountable.
>>
>>57105690
yes, it is. You are literally retarded for thinking otherwise. That's what the powerset is.
>>
>>57105701

Godfuckingdamnit, Pajeet. The power set also includes all infinite sequences of integers.
>>
Fucking lel, lots of CS graduates in this thread.

Here's a proof that the set OP describes is countable

0
1
0 0
2
0 1
0 0 0
3
0 -1
0 0 1
0 0 0 0
4
1 0
0 0 -1
0 0 0 1
0 0 0 0 0
5
1 1
0 1 0
0 0 0 -1
0 0 0 0 1
0 0 0 0 0 0
...
>>
>>57105348
Integer i = 0;
while(true){
System.out.print(i);
}

There you go. It will print every known number in sequence in the same line until Integer explodes...
>>
>>57105878

Five Rupees have been deposited to your account, Pajeet.
>>
>>57105348
int i = 0;
while(true) {
printf("%d\n", i);
i += 1;
}
>>
>>57105818
I'm not sure what you're trying to prove here, it's a pointless question as integers overflow eventually. If it asked for an algorithm, or pseudocode, then sure, but it asks for a concrete program, which is useless.
>>
>>57105818
you're right that it's countable, but this isn't o proof. Your method of enumeration will not enumerate all possibilities. nice try, though
>>
>>57105937
for(int i = 0; i++;true) is more compact
>>
>>57105348
>finite sequence of integers
>finite
>implying you could solve all finite sequences of an infinite set
wat

>>57105396
>cannot differentiate between a sequence and a permutation
OP confirmed for Pajeet
>>
>>57105938
you can use non primitive types to achieve integers of arbitrary length
>>
>>57106001

Which sequence won't be enumerated?
>>
>>57106016
like what?
GMP and BigInteger have hard limits as well, altough they're rather high.
>>
>>57106031
make your own.
>>
>>57106017
6, for starters.
>>
>>57106031
[]bool
>>
>>57105399
250k my first 6 months

contracting
>>
>>57105348
>By making a program that lists all finite sequences of integers such that each sequence occurs exactly once.
But there are infinitely many such sequences. For instance, {1}, {1,2}, {1,2,3},... is an infinite sequence of sequences where each element sequence only appears once.
>>
>>57105399
>>57106053
>/g/ full of entrepreneurs six figures in the first year w/o a degree
Riveting tales, chaps, absolutely riveting.
>>
>>57106135
I have a degree. I said that.
>>
>>57106010
for(int x = 0;; printf("%d\n", ++x));
>>
>>57106348
nice
>>
For any Pajeet still doubting that the set is countable, here you go:

In mathematical logic and computer science, the Kleene star (or Kleene operator or Kleene closure) is a unary operation, either on sets of strings or on sets of symbols or characters. In mathematics it is more commonly known as the free monoid construction. The application of the Kleene star to a set V is written as V*. It is widely used for regular expressions, which is the context in which it was introduced by Stephen Kleene to characterise certain automata, where it means "zero or more".

If V is a set of strings, then V* is defined as the smallest superset of V that contains the empty string ε and is closed under the string concatenation operation.
If V is a set of symbols or characters, then V* is the set of all strings over symbols in V, including the empty string ε.

The set V* can also be described as the set of finite-length strings that can be generated by concatenating arbitrary elements of V, allowing the use of the same element multiple times. If V is either the empty set O or the singleton set {ε}, then V*={ε}; if V is any other finite set, then V* is a countably infinite set.[1]

The operators are used in rewrite rules for generative grammars.
>>
>>57106387
> if V is any other finite set, then V* is a countably infinite set.
Since when is the set of integers finite Ramesh?
>>
The solution is as follows:

Every finite sequences of integers can be represented by a binary number.

I don't have the time to put this into code, but that should be enough for someoney else to solve this.
>>
>>57106519
see >>57106013
>>
>>57106519
No it can't. The power set of the set of natural integers is uncountable.
>>
>>57105370
>>57105399
>>57106053
cannot relate
>>
>ITT: Retarded people who doesn't know numbers are infinite
>>
>>57105348
powerset :: [a] -> [[a]]
powerset = filterM $ const [True, False]

opisafaggot :: [[Int]]
opisafaggot = powerset [0..]
>>
>>57107406

This doesn't print every sequence.
>>
>>57105348
>>>>CS
>>>>WHERE WE ASK STUPID QUESTIONS AND ASSUME THEY'LL MATTER IN THE REAL WORLD
>>
here opie
 
spi = show pi

sequences = do
xs = take r spi
spi = drop r spi
return xs ++ sequences
where r = rand_int


output
 
prolog interpreter 2012 v. alberto
>> take 2 sequences
[[1, 877, 223, 886, 112], [911, 8282, 0, 1, 3, 3, 8, 2, 86]]
>>
>>57106563
Which is irrelevant, since we're talking only about finite sequences.
>>
>>57107970
Of which there's infinite, so you can't create a terminating valid program.
>>
>>57106563
>The power set of the set of natural integers is uncountable.
Yes, this is true. But the set of all *finite* subsets of a countable set, is also countable.

Let's say the finite sequences are of size n.
Then you have א choices for the first term, א choices for the second term, ... , א choices for the n-th term.

(א is aleph_0, the number of elements in the set of integers, i.e. a specific "type" of infinity)

So you have א*א*...* א (n-times) choices of a finite sequence of size n.

How aleph "numbers" work is, א=א*א (because aleph_a * aleph_b = aleph_(max{a,b}) )and thus
א=א*...*א, which means the set of finite sequences of integers is countable (but still infinite).

But this one (>>57108199) is true
>Of which there's infinite, so you can't create a terminating valid program.
>>
File: AmIDoingItRight.png (638KB, 4760x4986px) Image search: [Google]
AmIDoingItRight.png
638KB, 4760x4986px
do you need more proof?
>>
OP is probably a pajeet

He probably means to make all permutations of 0,9 of length 10.

ie

1,2,3...
12,3,...
1,23 ...
>>
>>57109040

No. That's not it.
>>
>integers
>finite
>>
it's impossible to write a library that can handle arbitrarily large numbers (consider that representing an arbitrarily large number in a finite space is equivalent to compressing an arbitrarily large data set to a finite size), so it is impossible to write a program which can solve this problem?
Thread posts: 58
Thread images: 2


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.