CIS 2910 (Fall14)
Due: September 30th , 2014
Assignment 2
Solution
Dr. Charlie Obimbo
1. Mathematical Induction
Use mathematical induction to prove that n! > n3 for n > a.
[4 marks]
First find a.
n
3
n!
n3
4
6
27
5
120
125
24
64
6
720
216
Thus a = 5
Theor
1 fix 6: q/Ua/wqfhf , 62 am /
gt (WM (5;? ix one way
cam a M a; cam/we W
COYWUCIer "Han/4' boH'Iwayg (A: B) 3~+ Sm ska/cfw_ML
225%: W gm 8 we: <55
14p, n lift/7% .
LEM) + (34% (94;);
M M 7M
\ O ( , U 0,
caei 2' 3 7 MGRmem : @0096 M jtixels ': a; egjvw 9%
Recurrence Relations
CIS 2910
Joe Sawada
University of Guelph
CIS 2910
Recurrence Relations
1 / 15
Recurrence Relations
Recall how sequences can be defined recursively
I
specify one or more initial terms a0 (a1 )  the basis
I
give a rule for determining
NPCompleteness
CIS 3150
Joe Sawada
University of Guelph
CIS 3150
NPCompleteness
1 / 24
Clique
Clique
A clique is a subset V 0 of V such that every pair of vertices in V 0 are adjacent (a
complete subgraph).
Decision problem: Does G contain a clique of s
Terminology and Special Types of Graphs
CIS 2910
Joe Sawada
University of Guelph
CIS 2910
Terminology and Special Types of Graphs
1/1
Terminology for Undirected Graphs
Definition
Two vertices u and v are said to be adjacent or neighbors if there is an edg
Generation Algorithms
CIS 2910
Joe Sawada
University of Guelph
CIS 2910
Generation Algorithms
1 / 12
Generating algorithms
So far we have only looked at the counting problem: How many items are there?
Now, we want to handle the question: What are all the
Euler and Hamilton Paths
CIS 2910
Joe Sawada
University of Guelph
CIS 2910
Euler and Hamilton Paths
1/7
Euler Paths and Cycles
The Seven Bridges of K
onigsberg
The town of K
onigsberg has 4 land regions separated by a river with 7 bridges joining
them. A
Representing Graphs and Isomorphism
CIS 2910
Joe Sawada
University of Guelph
CIS 2910
Representing Graphs and Isomorphism
1/8
Representing Graphs
For large graphs, we want to apply computers to solve tasks such as:
I Finding the shortest path between two
Introduction to Graphs
CIS 2910
Joe Sawada
University of Guelph
CIS 2910
Introduction to Graphs
1 / 10
Problems Solved Using Graphs
Graphs are frequently used to model real world problems. Many of these
problems can be solved by applying well known graph
Planar Graphs
CIS 2910
Joe Sawada
University of Guelph
CIS 2910
Planar Graphs
1/8
Planar Graphs
Circuit Design
When designing electronic circuits or computer chips, it is often desirable to implement
the designs without wires crossing.
crosssings
When lay
Connectivity
CIS 2910
Joe Sawada
University of Guelph
CIS 2910
Connectivity
1/1
Connectivity
Definition
Let G = (V, E) be a simple graph. A path is a sequence of vertices v0 , v1 , . . . , vn where
there is an edge between each consecutive pair of vertice
Graph Coloring
CIS 2910
Joe Sawada
University of Guelph
CIS 2910
Graph Coloring
1/7
Graph Coloring
Consider the problem of assigning frequencies to various radio transmitting stations. If
the transmission ranges overlap, then it is not desirable for them
:19. Hr rgoggit 4b lame WM #jJ/eyfii J Oegz #gan/egyl
NO, ag cfw_3 edgef; 9%; cfw_Q?
' D
_ (Vi/ad 761i fgvfk . w; x HIE/3 'e gteg. @Wq/ijt _:
w maa? e e
Ono
I . \L > r
A cfw_h ,7, M G offbC Wches; 3 m9 3&7 e
9
kiwiem dtavl
vx=\, 0
a
g: 5 unt/M W4 SkL/
CIS 2910 Fall 2008 Homework #3
Instructor: Joe Sawada
Make sure you include a completed and signed cover page as your rst page. In addition to
correctness, your answers must be clear, concise, and readable.
1. [6 marks] Implement the algorithm to generate
CIS 2910 Fall 2008 Homework #1 SOLUTIONS
Instructor: Joe Sawada
Make sure you include a completed and signed cover page as your rst page. In addition to
correctness, your answers must be clear, concise, and readable.
1. [3 marks] Ch 5.1 #24 How many strin
CIS 2910 Fall 2008 Homework #4
Instructor: Joe Sawada
Due date: Nov. 25  beginning of class
1. [2 marks] Ch 9.3#38 (justify)
Isomorphic. Both graphs are a K4 with an extra vertex added. Many isomorphisms are
possible, but u3 always gets mapped to v2 .
2.
upw kkXvF wtvvwtkXvnkot Xq P
e x w e e u x x
tpoeug yyww wtw [email protected] wwvtue vpck5yxorte pw )pu p u %puw yUwuwu e Pc
e j
c j X t j
e w vt j
iiyw5oq
ywuocfw_zyxvkt
 ~ u
yufocfw_zyxvkt
 u
yufocfw_zyxvkt
 u
yufHcfw_zyxvkt
 u
yufocfw_zyxvkt

University of Guelph
CIS 2910 F08 Midterm 2 (November 6)
Instructor: Joe Sawada
First Name:
Last Name:
Student Number:
Problem 1: (5 marks)
Problem 2: (6 marks)
Problem 3: (7 marks)
Problem 4: (6 marks)
Problem 5: (7 marks)
Problem 6: (4 marks)
Problem 7: