Showing posts with label Optimization Method. Show all posts
Showing posts with label Optimization Method. Show all posts

Sunday, May 13, 2012

Sudoku cheat

Hi, long time no blog! I just realize that I already had an awesome model to cheat the sudoku game. Last month, I bought the puzzle book to prove that my model wasn't wrong (actually, i'm think about won the price by cheating, lol). My project was about sudoku solving model from optimization method subject, I have to model and doing research about sudoku, what is the model, what's the different between using IP and CP, how was bigger problems, how was another rule of sudoku... etc. Actually my grade was not good, I got B+ with 79 points (- -") but i would say that the project introduce me how to model with IBM iLOG, knowing about sudoku in deep and it was fun to work with the game i like. ;) But my document still needs to improve.


Sudoku is a number placement puzzle based on logic rather than mathematics. Sudoku gained worldwide popularity in early 2005 and began selling in the form of puzzle books, handheld electronic versions and board games, as well as appearing in thousands of daily newspapers.

The concept of Sudoku is simple. The puzzle consists of a 9x9 square grid that is divided into nine 3x3 squares, resulting in nine rows and nine columns, for a total of 81 small squares. The unsolved Sudoku puzzle supplies only a few numbers in random squares.

To solve the puzzle, the remaining squares must be filled in with the numbers 1 through 9, each appearing only once in each row, column and 3x3 square.


There are more informations, model for both IP and CP and some another rules of sudoku, you can find out from my document
My project document: https://docs.google.com/open?id=0B-Ls4RhAgiHeQjBtdFFram1wRUk
My project presentation: https://docs.google.com/open?id=0B-Ls4RhAgiHeRFFvQWswZXRlYlU

Actually, I already record my video when i was using my model to solve the puzzle from the book but I'm too lazy to edit the video. But it works for all puzzle from the book! (of course!) I'll show you later if I have time to edit it.

Saturday, January 28, 2012

Optimal algorithm: Linear Programming

This week, i have learn about Linear Programming and using simplex algorithm
Linear programming (LP, or linear optimization) is a mathematical method for determining a way to achieve the best outcome (such as maximum profit or lowest cost) in a given mathematical model for some list of requirements represented as linear relationships. Linear programming is a specific case of mathematical programming (mathematical optimization).
[wikipedia]

Then I could give you some example, this is the popular problem called Diet Problem. The decision about how much of each food to buy (or eat) is to made entirely on dietary and economic considerations. And they will provide us the table of cost or nutrition stuff in order to support the question. Somehow if you ask me, i'll select my favorite first and eat them all. (LOL)

Last Thursday, I had chance to had a lunch with our lecturer and we were talking about some funny stuff in term of Duality. We discuss about how we should eat, should we eat the favorite food first or keep it for the last. My friend said, 'I'll save the best for the last'. I think this problem object to the maximum value, you eat them all but keep the best for the last. Then mine was different, I'll eat my favorite food first in order not to full at the last. So it might be object to minimum value. Subject to the quantity and quality of food. If save the best for the last is Primal, then eat the best first should be Dual for sure!

PS. don't believe my word this time, we just made fun because our optimization method teacher was with us that time. (LOL)