Home

About

Advanced Search

Browse by Discipline

Scientific Societies

E-print Alerts

Add E-prints

E-print Network
FAQHELPSITE MAPCONTACT US


  Advanced Search  

 
Math 4140 Homework 1 Key Problem 1 How many strings over the alphabet {A, B, C} fail to have adjacent repeated
 

Summary: Math 4140 Homework 1 Key
Problem 1 How many strings over the alphabet {A, B, C} fail to have adjacent repeated
letters? Your answer should be a function of the length n of the string. So, for example:
3 of length one: A, B, C
6 of length two: AB, AC, BA, BC, CA, CB
Answer: Notice that the first character can be anything but each subsequent character must
not match the one before it. This method will give all strings without adjacent repeated
letters. This means we have a three way choice followed by as many two way choices as are
needed to finish the string. Since independent choices multiply, we get
3 2n-1
Problem 2 Suppose that we want to pick four squares out of an N N grid so that the
four squares form a connected shape. Count, as a function of N then number of ways that
this can be done. Hint: divide and conquer.
Answer:
Lemma 1 There are (n-k +1)(n-m+1) ways to place a k m rectangle into an nn
grid.
Proof:
Given the width and height of the rectangle, n - k + 1 is the number of lateral positions
where the upper left corner of the rectangle can be placed, similarly n-m+1 is the number
of vertical positions where the upper left corner can be placed. Since the rectangle can be

  

Source: Ashlock, Dan - Department of Mathematics and Statistics, University of Guelph

 

Collections: Mathematics