b. How many ternary words of length 23 with eight 0 s, nine 1 s and six 2 s?

Similar documents
Exam 1 Solution. CS 542 Advanced Data Structures and Algorithms 2/14/2013

Paths. Connectivity. Euler and Hamilton Paths. Planar graphs.

Math 61 : Discrete Structures Final Exam Instructor: Ciprian Manolescu. You have 180 minutes.

An undirected graph G = (V, E) V a set of vertices E a set of unordered edges (v,w) where v, w in V

CSC Design and Analysis of Algorithms. Example: Change-Making Problem

Graph Isomorphism. Graphs - II. Cayley s Formula. Planar Graphs. Outline. Is K 5 planar? The number of labeled trees on n nodes is n n-2

Solutions for HW11. Exercise 34. (a) Use the recurrence relation t(g) = t(g e) + t(g/e) to count the number of spanning trees of v 1

12/3/12. Outline. Part 10. Graphs. Circuits. Euler paths/circuits. Euler s bridge problem (Bridges of Konigsberg Problem)

5/9/13. Part 10. Graphs. Outline. Circuits. Introduction Terminology Implementing Graphs

V={A,B,C,D,E} E={ (A,D),(A,E),(B,D), (B,E),(C,D),(C,E)}

V={A,B,C,D,E} E={ (A,D),(A,E),(B,D), (B,E),(C,D),(C,E)}

0.1. Exercise 1: the distances between four points in a graph

1. Determine whether or not the following binary relations are equivalence relations. Be sure to justify your answers.

The University of Sydney MATH2969/2069. Graph Theory Tutorial 5 (Week 12) Solutions 2008

Complete Solutions for MATH 3012 Quiz 2, October 25, 2011, WTT

CSE 373. Graphs 1: Concepts, Depth/Breadth-First Search reading: Weiss Ch. 9. slides created by Marty Stepp

COMP108 Algorithmic Foundations

CS 241 Analysis of Algorithms

Algorithmic and NP-Completeness Aspects of a Total Lict Domination Number of a Graph

CS200: Graphs. Graphs. Directed Graphs. Graphs/Networks Around Us. What can this represent? Sometimes we want to represent directionality:

CSE 373: More on graphs; DFS and BFS. Michael Lee Wednesday, Feb 14, 2018

Announcements. Not graphs. These are Graphs. Applications of Graphs. Graph Definitions. Graphs & Graph Algorithms. A6 released today: Risk

Module graph.py. 1 Introduction. 2 Graph basics. 3 Module graph.py. 3.1 Objects. CS 231 Naomi Nishimura

Outline. Circuits. Euler paths/circuits 4/25/12. Part 10. Graphs. Euler s bridge problem (Bridges of Konigsberg Problem)

CS61B Lecture #33. Administrivia: Autograder will run this evening. Today s Readings: Graph Structures: DSIJ, Chapter 12

ECE COMBINATIONAL BUILDING BLOCKS - INVEST 13 DECODERS AND ENCODERS

(2) If we multiplied a row of B by λ, then the value is also multiplied by λ(here lambda could be 0). namely

Planar Upward Drawings

CSI35 Chapter 11 Review

1 Introduction to Modulo 7 Arithmetic

Graphs. Graphs. Graphs: Basic Terminology. Directed Graphs. Dr Papalaskari 1

QUESTIONS BEGIN HERE!

Graphs. CSC 1300 Discrete Structures Villanova University. Villanova CSC Dr Papalaskari

CS 461, Lecture 17. Today s Outline. Example Run

Constructive Geometric Constraint Solving

MAT3707. Tutorial letter 201/1/2017 DISCRETE MATHEMATICS: COMBINATORICS. Semester 1. Department of Mathematical Sciences MAT3707/201/1/2017

, each of which is a tree, and whose roots r 1. , respectively, are children of r. Data Structures & File Management

Weighted graphs -- reminder. Data Structures LECTURE 15. Shortest paths algorithms. Example: weighted graph. Two basic properties of shortest paths

Section 10.4 Connectivity (up to paths and isomorphism, not including)

NP-Completeness. CS3230 (Algorithm) Traveling Salesperson Problem. What s the Big Deal? Given a Problem. What s the Big Deal? What s the Big Deal?

Cycles and Simple Cycles. Paths and Simple Paths. Trees. Problem: There is No Completely Standard Terminology!

Outline. 1 Introduction. 2 Min-Cost Spanning Trees. 4 Example

QUESTIONS BEGIN HERE!

Garnir Polynomial and their Properties

Outline. Computer Science 331. Computation of Min-Cost Spanning Trees. Costs of Spanning Trees in Weighted Graphs

GREEDY TECHNIQUE. Greedy method vs. Dynamic programming method:

CS September 2018

Greedy Algorithms, Activity Selection, Minimum Spanning Trees Scribes: Logan Short (2015), Virginia Date: May 18, 2016

Why the Junction Tree Algorithm? The Junction Tree Algorithm. Clique Potential Representation. Overview. Chris Williams 1.

COMPLEXITY OF COUNTING PLANAR TILINGS BY TWO BARS

# 1 ' 10 ' 100. Decimal point = 4 hundred. = 6 tens (or sixty) = 5 ones (or five) = 2 tenths. = 7 hundredths.

Announcements. These are Graphs. This is not a Graph. Graph Definitions. Applications of Graphs. Graphs & Graph Algorithms

12. Traffic engineering

Chapter 18. Minimum Spanning Trees Minimum Spanning Trees. a d. a d. a d. f c

Numbering Boundary Nodes

More Foundations. Undirected Graphs. Degree. A Theorem. Graphs, Products, & Relations

Instructions for Section 1

5/7/13. Part 10. Graphs. Theorem Theorem Graphs Describing Precedence. Outline. Theorem 10-1: The Handshaking Theorem

learning objectives learn what graphs are in mathematical terms learn how to represent graphs in computers learn about typical graph algorithms

(a) v 1. v a. v i. v s. (b)

Minimum Spanning Trees

Present state Next state Q + M N

CSE303 - Introduction to the Theory of Computing Sample Solutions for Exercises on Finite Automata

EE1000 Project 4 Digital Volt Meter

Organization. Dominators. Control-flow graphs 8/30/2010. Dominators, control-dependence. Dominator relation of CFGs

XML and Databases. Outline. Recall: Top-Down Evaluation of Simple Paths. Recall: Top-Down Evaluation of Simple Paths. Sebastian Maneth NICTA and UNSW

Winter 2016 COMP-250: Introduction to Computer Science. Lecture 23, April 5, 2016

Integration Continued. Integration by Parts Solving Definite Integrals: Area Under a Curve Improper Integrals

Seven-Segment Display Driver

Chapter 9. Graphs. 9.1 Graphs

ECE 407 Computer Aided Design for Electronic Systems. Circuit Modeling and Basic Graph Concepts/Algorithms. Instructor: Maria K. Michael.

Trees as operads. Lecture A formalism of trees

10/30/12. Today. CS/ENGRD 2110 Object- Oriented Programming and Data Structures Fall 2012 Doug James. DFS algorithm. Reachability Algorithms

Designing A Concrete Arch Bridge

Computational Biology, Phylogenetic Trees. Consensus methods

TOPIC 5: INTEGRATION

Graph Contraction and Connectivity

Module 2 Motion Instructions

Quartets and unrooted level-k networks

N=4 L=4. Our first non-linear data structure! A graph G consists of two sets G = {V, E} A set of V vertices, or nodes f

CSE 373: AVL trees. Warmup: Warmup. Interlude: Exploring the balance invariant. AVL Trees: Invariants. AVL tree invariants review

Graph Theory Homework Summer 2018

Floating Point Number System -(1.3)

Counting Paths Between Vertices. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs

Floating Point Number System -(1.3)

A Simple Code Generator. Code generation Algorithm. Register and Address Descriptors. Example 3/31/2008. Code Generation

Grade 7/8 Math Circles March 4/5, Graph Theory I- Solutions

16.unified Introduction to Computers and Programming. SOLUTIONS to Examination 4/30/04 9:05am - 10:00am

FSA. CmSc 365 Theory of Computation. Finite State Automata and Regular Expressions (Chapter 2, Section 2.3) ALPHABET operations: U, concatenation, *

Logic, Set Theory and Computability [M. Coppenbarger]

Solutions to Homework 5

Nefertiti. Echoes of. Regal components evoke visions of the past MULTIPLE STITCHES. designed by Helena Tang-Lim

Mid-Term Examination - Spring 2014 Mathematical Programming with Applications to Economics Total Score: 45; Time: 3 hours

Problem solving by search

13. Binary tree, height 4, eight terminal vertices 14. Full binary tree, seven vertices v 7 v13. v 19

Last time: introduced our first computational model the DFA.

Register Allocation. How to assign variables to finitely many registers? What to do when it can t be done? How to do so efficiently?

S i m p l i f y i n g A l g e b r a SIMPLIFYING ALGEBRA.

Graph Theory. Vertices. Vertices are also known as nodes, points and (in social networks) as actors, agents or players.

INTEGRALS. Chapter 7. d dx. 7.1 Overview Let d dx F (x) = f (x). Then, we write f ( x)

Transcription:

MATH 3012 Finl Exm, My 4, 2006, WTT Stunt Nm n ID Numr 1. All our prts o this prolm r onrn with trnry strings o lngth n, i.., wors o lngth n with lttrs rom th lpht {0, 1, 2}.. How mny trnry wors o lngth 23?. How mny trnry wors o lngth 23 with ight 0 s, nin 1 s n six 2 s?. Lt t n not th numr o trnry strings tht o not hv 1 ollow immitly y 2. Fin (ut o not solv) linr rurrn qution stisi y t n. 2. How mny ltti pths rom (2, 3) to (17, 12) pss through (4, 6) n (8, 10)? 3. How mny intgr vlu solutions to th ollowing qutions n inqulitis:. x 1 + x 2 + x 3 + x 4 = 40, ll x i > 0.. x 1 + x 2 + x 3 + x 4 = 40, ll x i 0.. x 1 + x 2 + x 3 + x 4 40, ll x i 0. 4. Us th Eulin lgorithm to in = g(168, 1320).

5. Us your work in th pring prolm to in intgrs x n y so tht = 168x + 1320y. 6. 4 23 6 10 13 2 8 11 9 1 7 5 15 22 21 12 14 20 24 16 3 17 25 18 19. Fin th st o miniml lmnts o this post.. How mny lmnts o r inomprl with th point ll 12?. Explin why {3, 16, 17} is not mximl ntihin.. For h x, lt hight(x) not th mximum siz o hin hving x s its grtst lmnt. Writing irtly on th igrm, ll h point with th intgr rprsnting its hight.. Fin th hight h o this post. Fin hin o h points.

7. g. This post is n intrvl orr n hs 5 istint own sts. Fin thm.. This post lso hs 5 istint up sts. Fin thm.. Fin th uniqu intrvl rprsnttion or this post whr vry lmnt is ssign n intrvl with intgr npoints rom {1, 2, 3, 4, 5}. 8. Din n intrvl orr P with point st X = {,,,,,, g, h, i, j}. y th ollowing intrvl rprsnttion. j h i g Us th First Fit lgorithm to prtition o this post into minimum numr o hins. Provi your nswr y lling th intrvls in th igrm with positiv intgrs so tht ll lmnts ssign th sm intgr orm hin. Thn in mximum ntihin in this post.

9. k j g h l i Us th Gry Algorithm n lphti orr to in n ulr iruit in th grph ov. Your nswr shoul givn s squn o prtil iruits strting with th trivil iruit (). 10. 48 64 34 38 41 29 58 37 38 h 49 32 48 23 42 44 34 g In th sp low, list in orr th gs whih mk up minimum wight spnning tr using, rsptivly Kruskl s Algorithm (voi yls) n Prim s Algorithm (uil tr). For Prim, us vrtx s th root. Kruskl s Algorithm Prim s Algorithm

11. 1 9 6 7 2 4 3 8 10 5. Show tht this grph is hmiltonin y listing th vrtis in n orr whih orms yl o siz 10.. Explin why this grph hs nithr n ulr iruit nor n ulr pth. 12. A t il igrph t.txt hs n r or igrph whos vrtx st is [6]. Th wights on th irt gs r shown in th mtrix low. Apply Dijkstr s lgorithm to in th istn rom vrtx 1 to ll othr vrtis in th grph. Also, or h x, in shortst pth rom 1 to x. W 1 2 3 4 5 6 1 0 13 51 20 34 7 2 60 0 28 9 19 8 3 46 60 0 19 9 60 4 16 43 17 0 8 14 5 23 11 7 13 0 28 6 19 8 82 16 28 0

13. Writ th gnrl solution o th vnmnt oprtor qution: (A 2) 3 (A 1) 4 (A + 6) 2 (A 8) = 0. 14. Fin prtiulr solution to th vnmnt oprtor qution: (A 2 9A + 18)(n) = 20(2) n. 15. Fin th uniqu solution to th vnmnt oprtor qution: (A 2 9A + 18)(n) = 20(2) n with (0) = 3 n (1) = 16. 16. Lt X st n lt P = {P 1, P 2,..., P m } mily o proprtis. For h sust S {1, 2,..., m}, lt N(S) not th numr o lmnts o X whih stisy proprty P i whnvr i S. Writ th Inlusion-Exlusion ormul or th numr o lmnts o X whih stisy non o th proprtis in P: 17. Writ th Inlusion-Exlusion ormul or th Eulr-φ untion. 18. Us th ormul rom th pring prolm to in φ(n) whn n = 2 4 3 2 5 3. 19. Lt R(n, m) not th lst positiv intgr t so tht vry grph on t vrtis ontins omplt sugrph o siz n or n inpnnt st o siz m. Bo lims tht R(3, 3) = R(4, 4) = 6. Ali rplis tht Bo is only hl right. R(3, 3) = 6 ut R(4, 4) > 6. Explin why Ali s ssrtion tht R(4, 4) > 6 is orrt.

20. Wht is th ormul or th numr o ll trs with vrtx st {1, 2,..., n}? 21. How mny wys r thr to ssign lls rom th st {1, 2,..., 10} to th unll tr shown low? 22. S 84, 60 63, 25 17, 17 G 31 8 27 20 C E 38, 5 43, 43 39, 9 43, 17 6, 6 28, 22 16 0 25 11 52 34 I A H 78, 43 30, 30 7, 7 24, 24 B 30, 5 18, 7 24 7 37 7 J D F 59, 31 5, 5 90, 66 T. Wht is th urrnt vlu o th low?. Wht is th pity o th ut V = {S, A, C, I, E, G, H} {B, D, F, J, T }.. Crry out th lling lgorithm, using th psuo-lphti orr on th vrtis n list low th lls whih will givn to th vrtis.. Us your work in prt to in n ugmnting pth n mk th pproprit hngs irtly on th igrm.

. Crry out th lling lgorithm son tim on th upt low. It shoul hlt without th sink ing ll. Fin ut whos pity is qul to th vlu o th low. 23. In th igur ov, w show post n th iprtit grph ssoit with it. Th rkn gs orm mximum mthing in th grph. Fin th minimum hin prtition trmin y this mthing.