Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please include your work. 1) a) This is a variant of the Josephus problem. Josephus was one of the leaders of Jewish revolt against Rome

Please include your work.

1) a) This is a variant of the Josephus problem. Josephus was one of the leaders of Jewish revolt against Rome in the year 66. Assume that n prisoners were sitting in a circle and numbered clockwise from 1,2, ...n. Proceeding clockwise, every other prisoner was killed. Prisoner 2 was killed first, then prisoner 4, and this continued until there was only one prisoner left. This lone remaining prisoner was not killed and considered the lone survivor. The goal was to stand in the correct position initially such that you would be the lone survivor. Denote the position of the lone survivor as J(n) where n is the number of people siting in the circle. As an example: J(5) = 3 (Order of deaths: 2,4,1,5). Prove using induction that J(2^i) = 1 for all i >= 1.

b) Give a recursive definition of the function min so that min(a1,a2,....an) is the minimum of the n numbers a1,a2,....an.

c) Find f(n) when n = 5^k, where f satisfies the recurrence relation f(n) = 4f(n/5) + n^2, with f(1) = 1.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Relational Database Design With Microcomputer Applications

Authors: Glenn A. Jackson

1st Edition

0137718411, 978-0137718412

More Books

Students also viewed these Databases questions

Question

Describe the 6 Global Risk Issues related to Global Sourcing

Answered: 1 week ago