[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Help me /g/uys
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 28
Thread images: 4
File: 1446604122030.jpg (164 KB, 998x958) Image search: [Google]
1446604122030.jpg
164 KB, 998x958
I always like technology since I was a kid. I used to know my shit for my age but now I don't really know much.

How do I learn more about hardware (processors mobo etc..) and software? For example, I want to be able to figure out the best pc build in terms of power or value with best compatibility.

I did build my own pc recently but that's as simple as following a yt video and choosing parts with pcpartpicker
>>
111112221
>>
>>55056760
Retard
>>
>>55056697
312211
>>
>>55056770
My bad I meant
111112211
>>
>>55056779
Should it be 132211?
>>
>>55056797
No

Start :
1
There's one 1, so the next is : 11
Now, there's two 1 so the next is : 21
Now, there's one 2 and one 1, so the next is : 1211
...
>>
>>55056812
So shouldn't it be
12411
Then?
>>
>>55056832
1211 :
1 one (1), 1 two (2), 2 one (1)
111221 :
3 one (1), 2 two (2), 1 one (1)
312211
/thread
>>
>>55056797
This
>>
>>55056697

It's "312211".

>https://en.wikipedia.org/wiki/Look-and-say_sequence

"111221" reads as:

31 ("3 times 1")
22 ("2 times 2")
11 ("1 time 1")
>>
>>55056697
that's fucking cool tbqh
>>
>>55056864
The three should sandwich with the 2s though
>>
>>55056953
Can this be predicted indefinitely without saying the numbers?
>>
>>55057027
teach your computer to say numbers out loud
>>
>>55057027
Probably. You only need to store the numbers in an array and keep count of the number of times you get a sub list of numbers when reading the array in a left to right fashion.
So [1] would be an array of length one containing a 1.
Turn that into [count,one]
Then we get [1,1]
Count on the ones is two 1s.
Turn that into [count-ones,1]
Then we get [2,1]
Then count unique numbers again
[Count-2s, 2, count 1s, 1]
Turns into [1,2,1,1]
And so on.
>>
>>55056697
Or we can just go with:
2211111211
:^)
>>
>>55057027
You can do it functionally.
>>
File: 1415146070275.gif (448 KB, 200x183) Image search: [Google]
1415146070275.gif
448 KB, 200x183
>>55056697
>tfw OP derailed his own thread in the opening post
>>
File: 1462387985621.png (469 KB, 595x579) Image search: [Google]
1462387985621.png
469 KB, 595x579
>>55057221
Lmao I realise my mistake
>>
>>55057027

At first we define a data structure (for example a "linked list") where each element points to his successor, for example: "111" gets "31". There are 92 elements (according to Wikipedia).

Then we need a recursive function which takes f(n-1) and splits it at the points where the numbers change. Each elements's successor is looked up and put together.

Not that difficult, actually.
>>
>>55057325

> (for example a "linked list")

Ah shit, this is nonsense.

We need no linked list, we need a simple map:
The keys are the parts of the sequences, the values are the successors:

>map = {1: 11, 11: 21, 111: 31, 2: 12, 22: 22, 222: 31, 12: 1112, ...}

Then it's just one lookup for each part of the sequence..
>>
File: 1464440200675.jpg (121 KB, 986x986) Image search: [Google]
1464440200675.jpg
121 KB, 986x986
>>55056697
I can see it's a fibonacci sequence but wtf how does digits should be placed
>>
>>55057259

Ah well, I feel sorry for you..

>http://portal.aauj.edu/portal_resources/downloads/hardware/acomplete_illustrated_Guide_to_the_pc_hardware.pdf
>>
>>55057428

Oh, the link was a little bit old, this looks promising:

>http://web.info.uvt.ro/~acraciun/lectures/carch/pdf/computerArchitectureNotes.pdf
>>
>>55057383

Guys, I did it:

# Ruby ftw

def next_Number (a)
a = a.to_s.split(/([1]+|[2]+|[3]+)/).reject {|e| e.empty?}
a.map{|e| e.length.to_s << e[0]}.join
end


Damn, that was tough..
>>
>>55058078

Tested it:

tmp = 1
1.upto(10) do
puts tmp
tmp = next_Number (tmp)
end

# Output:
#1
#11
#21
#1211
#111221
#312211
#13112221
#1113213211
#31131211131221
#13211311123113112211
>>
>>55058078
>>55058203

I know nobody cares, but I made a clear version.

I'm sorry that the RegEx is so bad, otherwise I wouldn't have to throw out the empty strings afterwards..

tmp = '1'

(1..10).each do
puts tmp
tmp = tmp.split(/([1]+|[2]+|[3]+)/)
.reject {|e| e.empty?}
.map{|e| e.length.to_s << e[0]}
.join
end
Thread replies: 28
Thread images: 4

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

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.