Rectangle divided into smaller rectangles

combinatoricsgraph theoryrectangles

A rectangle is divided into smaller rectangles, whose sides are parallel with the big rectangle. Let $c$ be the number of crossings (points in the interior where four rectangles meet), $l$ the number of internal lines, and $r$ the number of rectangles. For example, in the diagram below, $c = 4$ (the four crossings are marked in red), $l = 7,$ and $r = 12.$

Find a formula for $r$ in terms of $c$ and $l.$

enter image description here

I'm not sure how to turn this problem into a graph theory problem. I looked at how each rectangle is defined by 4 vertices, which gives us 4r vertices. I know that I have overcounted because each red vertex is counted 4 times and the other 4 vertices of the big rectangle are overcounted as well. I'm not sure how to continue.

Best Answer

Approach: Double counting

Hint: About each vertex, count the number of corners at belong to one of these $r$ rectangles.

There are $4r$ right angles.
Each crossing is associated to 4 right angles.
Each internal line is associated to how many right angles?
Are there any right angles that we've missed, or overcomunted?

$4r = 4c+4l + 4 $

Related Question