Rubicon Forum
Welcome, Guest. Please login or register.
March 24, 2017, 07:59:28 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.
5469 Posts in 238 Topics by 2433 Members
Latest Member: TaxiService
* 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 4392 times)
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
Posts: 715

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).

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

Powered by MySQL Powered by PHP Powered by SMF 1.0.22 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!