Rubicon Forum
Welcome, Guest. Please login or register.
September 06, 2008, 01:52:46 AM

Login with username, password and session length
Search:     Advanced search
Forum users can use the crate icon (or [level] and [/level] tags) when writing a post, to make a direct link to a level.
3803 Posts in 194 Topics by 2403 Members
Latest Member: jappie001
* Home Help Search Login Register
+  Rubicon Forum
|-+  Playing the Game
| |-+  Open Design Challenges (Moderator: Bucky)
| | |-+  Super Challenge: Streak Counter
« previous next »
Pages: [1] Print
Author Topic: Super Challenge: Streak Counter  (Read 1377 times)
jboymicro
Operator
**
Posts: 14


View Profile Email
Super Challenge: Streak Counter
« on: December 31, 2006, 03:00:13 PM »

Ok, here's the idea:

You need to design a system that can count how many elements there are in a certain streak. Say, for example, your streak is based on 0-9 digits (as opposed to a-b-c-d-e-f). The challenge is then to make a machine that, feeding from a random generator, counts how many times in a row the random generator spits out a 0-9 digit. For example, if the "randomer" spits out an E followed by 2,4,6,1,9,0,5,D, the machine should be able to recognize that you had a streak of 7 numbers in a row. Also, if the machine hits a letter after a streak of numbers, the "elements in the streak" counter should return to 0.
Of course, you don't have to just consider a streak for numbers 0-9. You could make a machine that counts streaks of odd numbers, or letters, or 0s and 1s, or whatever. Also, this is not required, but if would be cool if the machine would, after finishing reading a streak, spit out a crate with the number of how many elements were in that streak.

Good luck.  Wink
Logged
Rene
Director
*****
Posts: 435


View Profile Email
Re: Super Challenge: Streak Counter
« Reply #1 on: December 31, 2006, 03:49:23 PM »


Here is juvifug. I borrowed the resettable counter from my solution to JF's Pillbox (cabacyb).

Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Rubicon Forum | Powered by SMF 1.0.8.
© 2001-2005, Lewis Media. All Rights Reserved.
Valid XHTML 1.0! Valid CSS!