Answers for Homework 1
Abbreviations. IH = Induction Hypothesis.
TLR = The Limit Rule.
(i) PG Problem 20.
We take the hint and rst show: 2n > 2n + 1 for all
n 3.
B ASE CASE . 23 = 8 > 7 = 2 3 + 1.
I N
CIS 675 Fall 2015 Homework 1
Instructions: Submit your solutions in a pdf le to Blackboard by midnight
Eastern time on September 24, 2015. Late submissions will not be accepted!
All answers must be pr
CIS 675, Spring 2012
Solution of Homework 2
Solution of 1.2:
Take any number N , where (N 1). The number of bits needed to represent N in
binary is log2 (N + 1) and the number of digits needed to repr
Homework 1 - Solutions
Question 0.3
In this problem we will conrm that this sequence grows exponentially fast and obtain some bounds on its
growth.
(a) Use induction to prove that Fn 20.5n for n 6.
An
CIS 675, Spring 2012
Solutions of Homework 3
Question 2.4
Suppose you are choosing between the following three algorithms.
Algorithm A solves problems by dividing them into ve sub-problems of half th
Homework 3 - Solutions
Question 2.5
Solve the following recurrence relations and give bound for each of them.
(a) T (n) = 2T ( n ) + 1
3
Ans:
Use Master Theorem; a = 2, b = 3 and d = 0.
logb a = log3
Running Time Analysis
CIS 675
Why Analyze Running Time?
Suppose youve created a new algorithm.
How do you convince people to use it?
Does it
Run faster?
Use fewer resources?
CIS 675
Why A
Depth-First Search
CIS 675
Searches in Graphs
Suppose we are given a vertex u and we want
to nd all ver?ces v that are reachable from u
(i.e., there is a path from u to v).
CIS 675
Depth
Directed Acyclic Graphs
CIS 675
Directed Acyclic Graphs (DAGs)
A DAG is a directed graph without cycles.
How can you tell whether a directed graph has a
cycle?
CIS 675
Directed Acyclic Gr
Divide and Conquer
CIS 675
Overview
A divide-and-conquer algorithm has three main
steps:
1. Break the problem into smaller subproblems.
2. Recursively solve the subproblems.
3. Combine the
Recurrence Relations
CIS 675
Recurrence Relations
A recurrence relation is an equation that
recursively defines a functions values in terms
of earlier values.
It can be very useful for analyzing a
The Master Method
CIS 675
Bounding Recurrences: The Master Method
n
d),
Suppose T(n) = aT( ) + O(n
b
for a > 0, b > 1, d 0.
ceiling symbol:
means to round
up
Case 1: If d > logba, then
Andorid Programming
Andorid Programming
Week 1 Part II
Mina Jung
EECS, Syracuse University
Fall 2017
Andorid Programming
Part I
Environment Set Up
Andorid Programming
Environment Set Up Using Genymoti
Proofs
CIS 675
CIS 675: How to Write a Proof
Is the sum of two even numbers even, odd, or possibly
either?
CIS 675: Design and Analysis of Algorithms
Proving a MathemaEcal Claim
There are sever
Lab-3
Read me
Questions:
1) Run JNachos with Water uncommented. It prompts you for the number of hAtoms
and number of OAtoms. Run the program with several different console Inputs.
Explain the output
Sor0g
CIS 675
Sor0g Algorithms
Goal: Given an unsorted array, output a sorted
array.
CIS 675
Sor0g Algorithms
Goal: Given an unsorted array, output a sorted
array.
Main ques%ons:
Wor
Graphs
CIS 675
Map Coloring
Suppose you are trying to pick colors for a map.
If two countries are next to each other, they
should have dierent colors.
How do you pick the colors?
CIS 675
Dealing with Hard Problems
CIS 675
How Can We Solve Real-World Problems?
Weve seen a few techniques:
Divide and conquer
Greedy
Linear programming
Dynamic prog
The Sun Network Filesystem: Design, Implementation and Experience
Russel Sandberg
Sun Microsystems, Inc.
2550 Garcia Ave.
Mountain View, CA. 94043
(415) 9607293
Introduction
The Sun Network Filesystem
DESIGN AND IMPLEMENTATION
OF SUN NETWORK FILE SYSTEM
Presented BySAMEER SAI
BOBBY JASUJA
Introduction
Sun NFS is a distributed file system that provides remote access to
files.
Developed by Sun Micros
Dynamic Programming Examples
CIS 675
Exercise: Maximum Con<guous Sequence
You have a sequence of numbers x1, x2, x3, , xn.
Find the con<guous subsequence [xi, , xj] with
the greatest sum.
Not
Dynamic Programming
CIS 675
Introduc6on to Dynamic Programming
Dynamic programming is a method of solving a
problem in which the solu6on to a large problem is
based on the solu6ons to smalle
Intelligent Exhaus/ve Search
(a.k.a. Brute Force)
CIS 675
Regular Brute Force
Brute force solu/on: Try every possible solu/on
and nd the best.
How long does this take for the following (assu
Social Network Analysis
(a.k.a. Graphs in Real Life)
CIS 675
PageRank
How do we determine the value of a website
on the Internet using the network structure?
CI
Social Network Analysis
(a.k.a. Graphs in Real Life)
CIS 675
PageRank
How do we determine the value of a website
on the Internet using the network structure?
CI
Preparing for the
Final Exam
Final Exam Outline
You'll have 120 minutes to complete the exam.
Part I: Select 2 of problems 1, 2, 3
Part II: Select 3 of problems 4, 5, 6, 7
Part III: You must do bo
Recap of the Course
CIS 675
Main Concepts
Proofs
Understand how to write a proof.
Understand the concept of induc<on.
Theore<cal running <me analysis
Why do
Heuris(cs
CIS 675
Heuris(cs
For some problems, backtracking/branch and
bound s(ll leaves too many poten(al solu(ons.
And we cant always nd an approxima(on
algorith