Brute Force Modeling

What is Brute Force Modeling?

Brute Force Modeling is a technique used to solve problems by tabulating results in hopes of finding a pattern by induction. The pattern or formula is then normally used as the basis for solving the problem thru iteration or recursion.

Let's take the Josephus Problem, where he (Josephus) and 40 other soldiers decided to choose mass suicide over capture by arranging themselves in a circle and killing the kth person in the circle. The problem of Josephus is where to sit in the circle such that he is the last to die (or escape).

Lattice Paths Part 2 (Brute Force Modeling and Iteration)

Starting in the top left corner of a 2 x 2 grid, and only being able to move to the right and down, there are exactly 6 routes to the bottom right corner.

How many such routes are there through a 20 x 20 grid, or any N x N grid?

--

This is the second of a three-part series article about explaining how you could have arrived at the solution yourself in solving the Lattice Paths Problem. If you haven't tried it yet, do it first. I do not intend to deny you of your epiphany moment!

Note: All implementations are written in C/C++.

--

Subscribe to RSS - Brute Force Modeling