0% found this document useful (0 votes)
264 views1 page

Comp 251 Assignment 1

This document outlines 4 proofs and algorithms related to data structures and algorithms. Problem 1 asks to prove by induction that n lines in a plane form at least one triangle region. Problem 2 asks to find an expression for the sum of squares of the first n natural numbers and prove it by induction. Problem 3 asks to prove by induction that n circles can be colored with two colors such that neighboring regions differ. Problem 4 describes Euclid's 9-step algorithm to transfer a line segment and asks to design a fewer step algorithm using the same tools that yields a translation, and prove its correctness.

Uploaded by

dergachev
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PS, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
264 views1 page

Comp 251 Assignment 1

This document outlines 4 proofs and algorithms related to data structures and algorithms. Problem 1 asks to prove by induction that n lines in a plane form at least one triangle region. Problem 2 asks to find an expression for the sum of squares of the first n natural numbers and prove it by induction. Problem 3 asks to prove by induction that n circles can be colored with two colors such that neighboring regions differ. Problem 4 describes Euclid's 9-step algorithm to transfer a line segment and asks to design a fewer step algorithm using the same tools that yields a translation, and prove its correctness.

Uploaded by

dergachev
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PS, PDF, TXT or read online on Scribd
You are on page 1/ 1

Data Structures and Algorithms COMP-251 A

Problem Assignment #1

1. Induction Proof (arrangement of lines)


Consider n lines (n > 2) in general position in the plane. Prove by induction that at least one
of the regions they form is a triangle.

2. Induction Proof (number theory)


Find an expression, as a function of n, of the sum of the squares of the first n natural num-
bers and then prove your claim by induction.

3. Induction Proof (circle map coloring)


Prove by induction that the regions formed by n circles in the plane can be colored with two
colors such that any neighboring regions are colored differently.

4. The Collapsing Compass Computer


In proposition II of Book I of The Elements, Euclid proposed an algorithm that takes nine
steps (using the straight-edge-and-collapsing-compass computer) to transfer (or displace)
a given line segment [a,b] to a new location so that one end point, say a, lies on a pre-spec-
ified point c in the plane. The transferred segment obtained by executing Euclid‘s algorithm
is not necessarily parallel to the original segment (i.e., the displacement is not necessarily
a translation).
(a) Design an algorithm that uses the same computer (the straight-edge-and-collapsing-
compass) and necessarily yields a translation. The fewer the steps the higher the mark. The
steps we are counting here are the number of times we use the straight edge to draw a line
plus the number of times we use the collapsing compass to draw a circular arc or circle.
(b) Prove that your algorithm in (a) is correct.

-1-

You might also like