Monday, August 5, 2013

Gambler's ruin

Gambling is risky and addictive.
1. Roulet:
Initially just observe the game.
It is safe to bet on odd(or even), go with previous 3/4 numbers.
If they are odd bet on odd. Then once we see the patern bet small coins on 4/36 probablity.

2. Black Jack: read about card counting.

If you are putting 100$, 60$ should be the recovery money.

Sunday, July 21, 2013

Playing paintball

Today I went for paintball first time with Yann and Ian, two canadian interns.
Few lessons learnt:
1. Wear full sleeves and cap. It really hurts when you are hit on the head. Receding hair does not help.
2. It is difficult to play in a summer day with glasses on. The sweat and vapor makes you blind. Add paints on the mask with it.
3. You can buy a small pack of paint. 500 paintballs is sufficient for a day.
4. You get game-bans for not wearing mask inside the net. They are quite strict.
5. You might loose the barrel cover. Pay special attention or loose 5$.
6. You might wait for some time, it is the end game that is easier.
7. Probably laser tag is easier. It does not hurt. :)

Thursday, July 18, 2013

ten books from my childhood

1. Chacha chaudhary and Gaja
http://issuu.com/pawmeen/docs/chacha-chaudhary-aur-gaja
2. Ajab desher roopkatha
3. Ek chatak bhut
4. Baro bhuter golpo
5. Anderson er golpo
6. Buddhiramer ajob kando
7. Ek bag shankar
8. Shanku
9. Phanton
10. sei aaschorjo barita
11. francis
12. nakugama
13. sagartire
14. Jules verne
15. sera aaschorjo, seta bsimay
16. o henry
17. bhuter mukhe ramnam: books from train

Friday, July 12, 2013

Learning C#

Namespace:
Are used to avoid conflict of class names.
You can define namespace Arindam and call some function me by calling Arindam.me();
Using Namespace helps for calling other functions in other namespaces.

public static void main:
public: any code can call it
static: a global process thus no need to instantiate

printing:
System.Console.Writeline

interface, class, objects, constructors
Remember class as structure+functions
for normal functions just use static, however for other functions use class-based functions, it is easier to use.

Interface is a group of methods with empty body. A class implements interface. Many class can implement an interface.

$\LaTeX$

Wednesday, July 10, 2013

Using Gurobi

For my project recently I am using gurobi, it has excellent LP and MIP solvers.

Here are the steps for using gurobi:
just download and install gurobi
go to examples->build->project 2012->MIP.cs and modify and enjoy

If you want to run it in another directory, you need to check "reference" of MIP.cs in solution explorer and add those in the new location. Then also make sure to modify the program runs for "x64" machines instead of all machines.

Happy Gurobi-ing!

Tuesday, March 16, 2010

How to install LaTeX in windows

Step1:
Download editor from TexnicCenter(http://www.texniccenter.org/).

Step2:
Download MiKTex from MiKTeX site(http://miktex.org/).

Step3:
Install MiKTeX.

Step4:
Install Texnic.
Provide ClassPath for MiKTeX as C:\Program Files\MiKTeX 2.8\miktex\bin.

Step5: Build(ctrl+F7), View(F5)

Tuesday, February 16, 2010

Bin Packing

Farnandez DelaVega Approach:

1. LP is based on configurations (m-tuple where m is the types of items).
2. No. of configurations exponential to m. To reduce configurations/constraints ignore items with size e/2.
3. Linear grouping. OPT(I')+k are sufficient to pack items after rounding and discarding on (n/k) groups. First group discarded rest are rounded to the highest size in the group.
m= n/k <>
Rounded items are packed in OPT+2/(e^2).
Discarded items need e.OPT.(e.OPT is given to pack k extra items k.SIZE(I).)
Small discarded items are in 1 bin.
(1+e)OPT+ 2/(e^2) +1 bins.

================================================================

Karp-Karmarkar Approach:

1. a_n>= 1/SIZE(I). -- Smaller pieces are packed later.
2. Geometric Grouping:
pack until total size exceeds 2. So, 2 <= size of gp <=3
G_i is i'th group with n_i elements.
Discard G_1, G_r and n_i - n_(i-1) in G_i.
3. Number of distinct pieces is <= SIZE(I)/2.
Discarded pieces total size = O(log (SIZE(I)))