All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > General
The not-always-lying politician (Posted on 2004-02-27) Difficulty: 3 of 5
There happens to be a politician that might lie at any moment (this isn't unusual) but his conscience bothers him enough (now, that is unusual!) so he won't say two lies in a row.

He said ten consecutive statements.

How many combinations of truths/lies can there be?

See The Solution Submitted by Federico Kereki    
Rating: 4.0000 (5 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Fibo again | Comment 2 of 20 |
ans:144

Sol: Denote by a(n) number of possible statements of length n. Clearly a(n)=a(n-1)+a(n-2),since you can add a" T " after each of n-1 statements or a "T+L" after each of n-2 statements .

So a(1)=2,a(2)=3 a(3)=5 etc... a(10)=144
This is classic fibo shifted by one.

Of course one can solve by evaluating the possible number of combinations for 0,1,...5 lies but that would be a tedious process for ,say, n=1000, while a fibo number can be evaluated without any recursion by a short procedure- number of steps being proportional to log(2) n.

In our case simple addition does it in a jiffy:
2 3 5 8 13 21 34 55 89 144.

ady

Edited on February 27, 2004, 10:43 am
  Posted by Ady TZIDON on 2004-02-27 10:22:03
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (6)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information