Degrees of Freedom and Sudoko
Source : Pixabay

Degrees of Freedom and Sudoko

Intuitive explanation of Degrees of Freedom and How Degrees of Freedom affects Sudoku

Lot of aspiring Data Scientists take courses on statistics and get befuddled with the concept of Degrees of Freedom. Some memorize it by rote as ‘n-1'.

But there is a intuitive reason why it is ‘n-1’.

The Intuitive Explanation

Let’s consider the following example.

Imagine being asked to choose 5 numbers that sum to 100. For simplicity sake you say 20, 20, 20, 20. Before you utter the 5th number, I tell you that your 5th number is 20 as well. This is because the first 4 numbers chosen by you summed up to 80 and the condition was to chose 5 numbers which sums to 100.

So 100 -80 = 20. The fifth number is 20.

The fifth number in a sense chose itself due to the condition specified.

You see you had 4 degrees of freedom alone. All one needed was the first four numbers.

This also intuitively explains the n-1. Here n being 5 and n-1 =4.

You lost one degree of freedom to the condition of “5 numbers should sum to 100”

or

In other words you had 4 degrees of freedom.

The Sudoku Connection

Sudoku is a very familiar game to most of us. Wikipedia gives the following definition

Sudoku originally called  Number Place)is a logic-based, combinatorial number-placement puzzle. The objective is to fill a 9×9 grid with digits so that each column, each row, and each of the nine 3×3 subgrids that compose the grid (also called “boxes”, “blocks”, or “regions”) contains all of the digits from 1 to 9. The puzzle setter provides a partially completed grid, which for a well-posed puzzle has a single solution.

I was solving a sudoku game just to kill some time. I realized that there is some connection between sudoku and degrees of freedom.

I am not sure whether the online version of the game take into account degrees of freedom to rate the game as “Easy”, “Medium” and“Expert”. But perhaps the game could be rated this way !!

Let me illustrate with an example taken from an online sudoku puzzle.

The ‘Easy’, ‘Medium’ ,‘Hard’ and “Evil’ levels of online sudoku game is depicted below.

Note there are 81 cells in an sudoku game.

More Degrees of Freedom = Tougher Sudoku

In each of the levels we notice something interesting. The number of filled in cells keeps getting smaller as the level goes from Easy to Evil !!

Basically as you have more cells to fill in (blank cells) the level keeps getting harder. The more degrees of freedom you have, the tougher it is solve the puzzle !! Having lot of freedom is not ideal in this case at least.

This was a small article connecting a statistical concept of Degrees of Freedom to a daily game like Sudoku.

I hope to write a code to depict the above in near future.

Ridhima Kumar

Chief Marketing Mix Modeling Officer (cMMMo) at Aryma Labs | Helping enterprises adopt marketing ROI solutions for a privacy first era |

3 年

Good article.

回复
Prashant Rai

Lead Data Engineer @ Harman | Expert in ETL, Celonis, and Process Mining | Driving Data-Driven Insights and Process Optimization

4 年

Great explanation....really cleared my concept for degree of freedom....Thanks

要查看或添加评论,请登录

社区洞察

其他会员也浏览了