You are not logged in. Please login at www.codechef.com to post your questions!

×

Correct answer of Family of Recurrences

Here is the problem.

If the input is

1

2 2

2 1

2 1

Ans should be f0 * sigma2 + f1 * sigma1 i.e. 2 * 1+2 * 1=4. But all accepted solution like this are giving 5 please explain.

Please Help .

asked 25 Sep '14, 15:40

the65bit's gravatar image

4★the65bit
1.1k101328
accept rate: 13%

Please Help !!!

(25 Sep '14, 20:38) the65bit4★

Thanks for the reply, in the question it is given

si = fi - 1 * sigma1 + ... + fi - m * sigmam

so shouldn`t s2 be equal to f1 * sigma1+f0 * sigma2.

Please help where I am going wrong

link

answered 25 Sep '14, 23:08

the65bit's gravatar image

4★the65bit
1.1k101328
accept rate: 13%

I just realized, the input itself is wrong, as sigma variable can take only 2 values. But I still could not figure out how their answer is coming 5..:(

(25 Sep '14, 23:45) rahul_nexus2★

Even Considering only 2 values of sigma

If the input is

1

2 2

0 1

0 1

Ans should be f0 * sigma2 + f1 * sigma1 i.e. 0 * 1 + 0 * 1 = 0. But all accepted solution like this are giving 1 please explain.

Please Help .

link

answered 26 Sep '14, 12:44

the65bit's gravatar image

4★the65bit
1.1k101328
accept rate: 13%

edited 26 Sep '14, 12:46

Please Help !!!

(30 Sep '14, 09:23) the65bit4★

Still stuck !!!

link

answered 05 Oct '14, 14:17

the65bit's gravatar image

4★the65bit
1.1k101328
accept rate: 13%

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×235
×100
×14

question asked: 25 Sep '14, 15:40

question was seen: 746 times

last updated: 05 Oct '14, 14:17