Studying in Zurich under strict budget

This post is for ETH students who have strict budget constrains.

Before going into the details, two meta-comments.

First, I never felt comfortable sharing these details. Nevertheless, my past self (almost 7 years ago) would find it useful.

Second, if you can work on the side (even 1 day/week — especially in CS), that may be enough to give you more room in your budget.

Temporary place

Youth hostel / AirBnB / friends.

This is needed until you find a more permanent place of stay, and sometimes that may take a while (2-3 weeks until you move to your permanent place).

If you see a listing about a room in an apartment that is not rented for a while, you may contact the owner and ask if you can stay for few days by paying pro rata. This is useful if at some point (usually weekend) the Youth hostel is fully booked. I never tried the AirBnB/friends solutions because they were not available.

Food: If you can’t cook at the temporary place, you can take the precooked chicken. You can clean your hands with wet wipes afterwards.

Permanent place

Try student housing.

Alternatively: Find two more people. The goal is to find an apartment in a building that is going to be renovated/demolished after ~6 months. You can find an apartment that can host 3 people with a price around 1000 francs. This is usually too expensive for 1 student, and too bothersome for a family to move out again after few months.

Using wohnen.etzh.ch you have good chances of getting accepted for the apartment.

Food

Go to a German supermarket (Aldi, Lidl) once per week. Budget around 50 francs. Look at the price per kilo and not per item.Avoid food that costs more than 10 francs/kilo. Pasta/rice/chicken/pizza/Paella/toast/sausages can be cheap. Buy fish cans with different sauces that you can use it on pasta/rice so you don’t get bored of eating the same thing. Don’t eat at Mensa. Eat at home or take food from home with you.

Clothes

On Saturday mornings on Helvetiaplatz you may find second hand clothes very cheap. Once, I bought a pair of jeans that were only 2 francs. Otherwise, try Brockenhaus.

Transportation

Buy a second hand bike. Put in your backpack extra clothes. Have waterproof jacker, pants, gloves, shoe covers. Don’t repair your bike once it is broken. Buy a second one around 100 francs after 4-5 months, if the first one is broken. Use the materials from the first one as replacement for the second one. Even without that, it is cheaper than public transportation (amortized).

Alternatively, if you don’t like biking in the rain, get a Halbtax and a Gleis-7 card. Check the weather prediction every morning. It rains about twice per week in Zurich. If you return after 19.00 by train, you will have to pay only the 1-hour ticket to go to ETH.

Moving out/in

Initially, buy cheap furniture for all people together. Share transportation costs. When you move to your second apartment, rent a big car. Do the cleaning yourself carefully. It takes at least a day. One more day for the move.

Going out

Go to parks, friends places’. Invite friends. Spend time at ETH.

Health insurance

Get an exception if you have a health insurance in your home country. Otherwise, find the cheap insurance for students. Go to the dentist/do checkups in your home country.

Airplane tickets

Book well in advance for Christmas. It may be more convenient to have your roundtrip flights starting from Zurich, but usually it is cheaper the other way around.

Phone

Get the cheapest option. Call home through internet. If your parents do not use a chatting app, you can always buy credits on Hangouts/Skype.

Internet

Check if someone from a neighbouring apartment wants to share their connection. Refer your friends/other students and get a referral from someone.

Budget

Some costs are not recurring (e.g. clothes, bike, moving out, airplane tickets). Budget for those.

Make money

Try an internship or a part time job even at ETH — ask your advisor. Check the regulations. You can work during summer/exam period as much as you want. During the semester, 2 days per week.

Other

Check the guide from ETH. Ask other students. Focus on your studies. You are not alone.

Advertisements

Heroes or enemies?

The one-armed woman said, “There was a movie called Maple recently. I don’t know if you’ve seen it. At the end, an adult and a child stand in front of the grave of a Red Guard who had died during the faction civil wars. The child asks the adult, ‘Are they heroes?’ The adult says no. The child asks, ‘Are they enemies?’ The adult again says no. The child asks, ‘Then who are they?’ The adult says, ‘History.’”

From the book “The three body problem”

Learn about chess endgames from stockfish

Stockfish has a very well documented codebase. Someone can learn a lot about chess even by just looking at the comments. As an example, here is what stockfish does in certain end games from the perspective of the strong side. For the weak side, the opposing plan is true. As a note for the rules that follow, they may not characterize all possible positions. If not, then the position has to be evaluated by looking more closely to its specifics.

Plenty of material vs King

– Just push the lone king towards the side and keep the distance of the two kings short.

King + Knight + Bishop vs King

– Similar as above. The difference is that the right corner is the corner with the same color as the bishop.

King + Pawn vs King

– It is evaluated based on some magic tables.

King + Rook vs King + Pawn

– If stronger’s side’s King is in front of the pawn, then this is a win.
– Similarly, if the weaker’s side’s King is too far from the pawn, it is also a win for the strong side.
– The position is a draw if the pawn is advanced and protected by the opposing king.

King + Rook vs King + Bishop

– Draw.

King + Rook vs King + Knight

– Draw, unless King and Kight are too far away.

King + Queen vs King + Pawn

– This is usually a win for the side with the Queen.
– The exception is when the Pawn is on the 7th rank, protected by the King, on the Rook or Bishop files, and the strong’s side King is far away from the pawn.

King + Queen vs King + Rook

– This is a win for the stronger side.
– The strong side wants the two kings closer and the enemy King driven to the edges.

King + 2 Knights vs King

– Draw.

King + Bishop + Pawns vs King

– This is in general a win for the strong side.
– Exception is when the pawns are in the same Rook file, where the promoting square is of different color compared to the Bishop and the enemy King can arrive there in time.

King + Bishop + Pawns vs King + Pawn

– Similar as above.
– Exception is when the pawns of the strong side are on a Knight’s file, there is an enemy’s pawn on the 7th rank and the bishop cannot attack it or if there is only one pawn from the strong side in that file. Then, there is a draw as long as the weak’s side King is within two squares from the blocking pawn, on the back two ranks, and the strong side’s King is farther away.

King + Queen vs King + Rook + Pawns

The weak is the one with King + Rook + Pawns.

– It returns a draw if the pawns form a “fortress” on the third rank and they defend the rook, and the king is at most up to rank 2, and the enemy king is farther away (rank 4 or beyond).

King + Rook + Pawn vs King + Rook

– Draw if the pawn is not too far advanced (5th rank), the defending king protects the queening square, and the attacking king is away. The draw is achieved through the third-rank defense.

– Draw if the pawn is on the 6th rank, by checking from behind the enemy King.

– Draw if the pawn is on the 6th rank or higher, the defending King controls the queening square, the defending rook is on the first rank and either the tempo is on the defending’s side or the distance between the two kings is at least two squares.

– Draw if the pawn is on A7, attacking Rook on A8, defending Rook behind the pawn, and defending King on H7 or G7. Symmetrically for a pawn on H7.

– Draw if the defending king is blocking the pawn and the attacking king is too far away.

– Win if the attacking king is closer to the pawn compared to the defending king. The pawn should not be on a rook’s file, though, and it should be close to be promoted.

King + Rook + Pawn vs King + Bishop

The only rule here concerns a possible pawn on a Rook file, which under some conditions can be a draw.

King + Rook + 2 Pawns vs King + Rook + 1 Pawn

Draw if the stronger side has no passed pawns and the defending king is actively placed.

King + Pawns vs King

Draw only if the pawns are on a Rook’s file and the defending king is in front of them.

King + Bishop + Pawn vs King + Bishop

– Draw if the defending King is in front of the Pawn and he can’t be kicked out.

– Draw if bishops are of opposite color and one of the following is true: (a) pawn is on rank 5 or earlier (b) the defending king is in front of the pawn or (c) the defending bishop attacks one square in front of the pawn and it is at least three squares farther away from the pawn.

King + Bishop + 2 Pawns vs King + Bishop

To have a forced draw, we need opposite color bishops. Then:

– Draw if the pawns are on the same file and the defending king is in front of the pawns.
– Draw if the pawns are on adjacents files, the defending king is in front of them, and the defending bishop controls the squares in front of them.

King + Bishop + Pawn vs King + Knight

– Draw easily if the defending King is in front of the Pawn, in a square that the attacking Bishop cannot go.

King + Knight + Pawn vs King

– Draw if a Rook pawn is on the 7th rank and the defending King is blocking it.

King + Knight + Pawn vs King + Bishop

– Win only if the Knight can prevent the Bishop from taking the Pawn.

King + Pawn vs King + Pawn

– Draw chances if the weaker side could achieve a draw even without its pawn.
– Exception is when the strong’s side Pawn is too advanced and the pawn is not on the Rook’s rank. Then, if the weaker side could have drawn even without its pawn, then it could have winning chances with its pawn.

Married functions

On Gödel Escher Bach, on page 137 there are two “married” functions defined:

for n >= 1:
F(n) = n – M(F(n – 1))
M(n) = n – F(M(n – 1))

for n = 0:
F(0) = 1, M(0) = 0

I wondered whether it is easy to define three function that increase their value every time n is increased by three, using only addition, subtracting and recursive calls to the previous value of the functions. It turns out it is not too hard to find some.

for n >= 1
F(n) = n – M(n – 1) – N(F(n – 1) + M(n – 1) + N(n – 1) – 2)
M(n) = F(n – 1)
N(n) = M(n – 1)

for n = 0:
F(0) = 1, M(0) = 0, N(0) = 0

Reverse recursively single linked list

There are two main ways to reverse a linked list: iteratively and recursively. I find the recursive solution easier to understand and cleaner. Unfortunately, I didn’t find any examples with tail recursion in the top results that I looked at, so I list my approach.

If someone wants to try their own approach, they can try on:
https://leetcode.com/problems/reverse-linked-list/

On marginalization

“I can’t bear to hear a human being spoken of with contempt just because of his group identification-even by other human beings. It’s these respectable people here who create those hooligans out there.”

The quote is from Dors from “Prelude to foundation” by Isaac Asimov.

“These respectable people here” refers to the snobbish class of people who made these comments. The “hooligans out there” refers to the marginalized part of the community who has developed violent behaviour.

Russell’s paradox

Let A be any set. We define B such as:
B = \{x \in A : x \notin x\}

Can it be that B \in A? No.

Proof by contradiction.

Assume B \in A.

  • If B \in B then by the definition of B:
    B \notin B. Contradiction.
  • If B \notin B then by the definition of B:
    B \in A \text{ and } B \notin B \implies B \in B. Contradiction.

Therefore B \notin A.

Credits for the succinct proof.