import java.util.Random;
import java.util.Scanner;
public class LibrarySort cfw_
public static void main(String[] args) cfw_
int n;
Scanner key = new Scanner(System.in);
System.out.println("Provide th
CS608 Algorithms and Computing Theory
Homework 2
Mayur Nayak (UID:- U01177266)
1) Find the value of f(7) given:
f(n) = 2f(x 1) + x
0
Answer:
By hand
if x >0
if x = 0
f (7) = 2 f(6) + 7
= 2 ( 2 f(5) +
CS608 Algorithms and Computing Theory
Homework 1
Mayur Nayak (UID:- U01177266)
1. (
)
for n 1
Proof:- Base step: If N = 1, then
=1
Inductive step: Assume (
Show (N+1) case (
(
)
(
)
)
(
=
=
=
=
2.
Pr
Homework 3
Alexander Gazarov
CS 608 Algorithms and Compu ng Theory
February 19, 2013
1. Come up with a divide and conquer algorithm. Use the template to describe and analyze the
algorithm.
Input: a an
Assignment 4
Part 1
Testing of Count method for number of a or A in the string.
Result
Testing of Square method by providing a number
Result
Testing of Divide method by providing two numbers.
Result
T