Ending a 33-year-old wait

When I was in upper kindergarten (UKG) in 1987-88, my teacher Chandrika Aunty had shown me how to do thread painting. It was a fascinating exercise. Cover a thread in paint, and then let it lie in a random pattern inside a folded piece of paper, and then pull out the thread. It creates a beautiful and symmetrical (thanks to the folding) pattern in the paper.

To my dismay, Chandrika Aunty failed to repeat this exercise, instead spending time to teach us other kinds of painting such as dipping ladies fingers in paint (I’ve always loathed ladies finger as a vegetable, so you can imagine my not being enthused by using it as a block-print).

Somehow my mother (who was generally interested in painting) wasn’t interested in doing this either. So as much as I loved it, I never ended up doing thread painting again as a child.

All that changed a few days back. With the lockdown on, my daughter’s school has been sending her “assignments” to do at home. Now, I find most of these assignments rather stressful. Sometimes they make me wonder what’s the point of sending her to a Montessori at all, if they are giving here homework that I have to supervise (thankfully none of these need to necessarily need to be turned in. They’re more for keeping her occupied. But looking at them as “pending” on the Google Classroom irritates me).

However, there was one assignment that I was rather excited to see. Thread painting! We sat on it for a few days without doing (basically NED happened). However, it was my wife’s birthday yesterday, and when we sat down to make a card for her on Tuesday, it seemed like the perfect opportunity to do thread painting.

And so we did, using a small string and water colour tablets (I was so excited by the idea of thread painting that I didn’t bother following the school’s instructions). Apply water to the colour tablet, put the thread on it (and use the brush to make sure the paint was coated on the thread). Then put it in a random pattern between the folded sheets. And then pull it out carefully (the last bit was done by the daughter with great interest).

This was the result:

I’m rather excited by this. For someone artistically challenged like me, this is a nice way to make nice-looking images.

I don’t intend to do a Chandrika Aunty. I plan to do thread painting on a regular basis with the daughter. It’s both fun to do and produces nice results, like what you see here.

The rest of her school assignments can remain undone. I don’t care.

Programming assignments and blind men and the elephant

Evaluating a tough programming elephant is like the story of the blind men and the elephant. Let me explain.

The assignments that I’ve handed out as part of my Spreadsheet Modelling for Business Decision Problems course at IIMB involve fairly complex spreadsheet modelling (as the name of the course suggests). Thus, while it is a lot of effort on behalf of the student to do the assignment, it is also a lot of effort on my behalf if I’ve to go through the code line by line (these guys code using VBA macros), understand it and evaluate them.

Instead, I have come up with a set of “tests” – specific inputs that I give to the program (I’ve specified what the “front sheet” should look like so this is easy), and then see if the program gives out the desired outputs. Either way, I dig a little deeper and see if they’ve done it right, and based on that I grade the assignment.

If the assignments that they’ve turned in are elephants, it’s too much of an effort for me to open my eyes and actually see that they are elephants. Hence, I feel around, and check for a few different components to make sure they’ve submitted elephants. So for this assignment I might check if the trunk is like a snake, and if so, they’ve passed. For another assignment, I might check if the legs are like trees, and if they are, pass them. And so forth.

Now, this is evidently not perfect. For example, if you know that I’ll only check for the trunk to be like a snake, you’ll just submit a trunk that’s like a snake rather than submitting a full assignment! But if you don’t know what I’m going to check for, then it might be possible that you’ve only submitted a snake, I look for treetrunks and not finding them, give you a failing grade! There is a little bit of luck involved on both sides, but that’s how things work!

Extending this analogy to software testing, you can think of that too as an exercise of blind men learning about an elephant. The testers are the blind men of Indostan, trying to find out if the piece of code they’ve been given is an elephant. Each tester pokes around at a different part of the beast, trying to confirm if it fits what they’re looking for. And if the beast has a knife, a snake, a fan, a wall, a tree and a rope as part of it, it is declared as an elephant!

Speaking of software testing, I came across this brilliant video of a class in Hyderabad where software testing is being taught. Enjoy (HT: V Vinay).

Deranging groups

Ok so this is a mathematical problem. I plan to give three group assignments to my IIMB class. Let’s assume that there are 60 kids and for each assignment I want them to form groups of four members each. For the first assignment I’ve let them form the groups themselves.

For the second assignment, though, I want to create a “derangement” of these groups – in the sense that I want to form a different set of 15 groups of 4 members each such that no pair of students who are in the same group for assignment 1 will be in the same group for assignment 2. And I’m looking for an algorithm to thus “derange” my students. And whether it is possible at all to derange students thus.

My inclination is that this might have a solution in graph theory – in terms of graph colouring or something? Take the students from the first group and join every pair of students that are in the same group with an edge. Then colour the nodes of the graph. Pick nodes of the same colour (these are students that haven’t been in groups together) and randomly assign them to new groups. Repeat for all colours.

Question is how many colours we need to colour the graph. If it’s planar, we’ll need only 4 colours! And considering that the first assignment has 4 students per group, the maximum degree of a node is 3. If the maximum degree of an edge is 3, does that say anything about the planarity of the graph? If I derange the students once for assignment 2, can I do it again for assignment 3 (now each node has a degree of 6!) ? How do I think about this mathematically? Can you help?