Three Pieces

For one I am incapable of making 5 pieces, and well I can’t classify the three that I have, ergo these shall be forever be three pieces… Now as for these questions, at a minimum I expect Rungta, Azgez, and “the dormant female programmer in 12th/11th” (taken from somewhere on this blog, probably) to solve these, though if neone else does it, well & good… If neone outside of Exun gets all three done, then well while I can’t promise ur inclusion into the club (alumnus, can’t really do that), however I can wud recommend that u be taken in, and well my recommendation wud probably work. For lack of time, and effort I haven’t put the problems into a more succinct form, so ur gonna have to work around that. So there that gets the preliminaries out of the way.

Now for three simple rules

  1. Contrary to popular belief, I do not have access to a grid or a super-computing facility, so make sure ur code can run in sane amts of time.
  2. Some of these questions r solvable by a single mathematical equation, some by recursion. Now I am not a fan of simulations, so if u get the these done without simulating the actual process, then well u get more points in my book, not all that useful, but well u never know…
  3. In code u submit to me, umm pls don’t use a void main(), since as of 6 or 7 years ago, ANSI regulations state that void main() is not a valid main funtion, use int main() instead, and return a value of 1.

The Questions

  1. Throughout this question, the term line and ray are supposed to take on their usual mathematical meanings, which is to say that a line extends infinitely in an infinite two dimensional plane, and a ray starts of at a particular point, but directional extends unto infinity. The question assumes that ur working on an infinite 2d plain. Now the question itself is pretty simple, so there r two parts to it. a) Given n (n>2) lines, what is the maximum number of regions u can divide ur 2d plain into? b) Now instead of lines if we used two rays at an angle, in a sort of V formation, what is the maximum number of regions with n (n>1) Vs then?
  2. There’s a room with n walls (2<n<10), shaped like a regular n sided polygon, with a mirror on each wall. The first wall contains a light source, for which you have a given x coordinate and the angle between the light beam and the wall (horizontal angle, the light beam is so arranged that the beam itself lies on a plane parallel to the floor of the room), and given the x coordinate extents (two coords each) of each mirror, predict the number of reflections that take place before the beam is absorbed. Assume that walls themselves are perfect absorbers of light, as is the light source. Also predict the number of times the rays intersect….
  3. A lil bit of military strategy. Umm well let’s have this as a story. Ur in one of those essentially violent central African countries, a part of a rather underfunded UNPKF, and the only possibility of survival rests in understanding rebel attack strategies. Now the rebel army follows some very peculiar rules, for one they always conduct battles with 12 units, and all battles last for 16 hrs. The rebel army is strictly hierarchal, so much so that on the pain of death, each subordinate wud do whatever his superior’s unit did and relay his superior’s commands to his subordinates immidiately. Unfortunately the rebel army relies on an extremely slow, though highly successful means of communication, and each message takes an hour to relay, which is to say that each subordinate does what his superior did an hour ago. Now given that 1 represents attack, and 0 represents retreat, and given an hour by hour analysis of rebel movements, ur program shud figure out the hierarchy of the rebel army. Every commander has a minimum of two subordinates.

    For instance if the movements read something like:

    1 2 3 4 5 6 7 8 9 0 1 2

    1 0 1 1 1 0 0 1 1 0 0 1

    0 1 1 1 0 1 1 1 1 1 1 1

    1 0 0 1 1 0 1 0 1 1 1 1

    1 1 0 1 1 1 0 1 1 1 1 0

    0 1 1 0 0 1 0 1 0 0 0 0

    0 0 1 0 0 0 1 0 0 0 0 1

    1 0 0 1 1 0 1 0 1 1 1 1

    1 1 1 1 1 1 0 1 1 1 1 0

    0 1 1 0 0 1 1 1 0 0 0 1

    1 0 0 1 1 0 1 0 1 1 1 1

    1 1 0 1 1 1 0 1 1 1 1 0

    0 1 0 0 0 1 0 1 0 0 0 0

    0 0 1 0 0 0 0 0 0 0 0 0

    0 0 0 0 0 0 1 0 0 0 0 1

    1 0 0 1 1 0 0 0 1 1 1 0

    0 1 1 0 0 1 0 1 0 0 0 0

    then u shud eventually find the following hierarchy

    Unit 3 commands Units 7 & 12

    Unit 7 commands Units 1, 4 & 5

    Unit 5 commands Units 2, 6 & 8

    Unit 12 commands units 9, 10 & 11

Neways best of luck doing these, mail me the solutions at aurojit@gmail.com, and well I’ll test them and get back to u….

Ze Panda

(The Mascot)

Programming question.

Right, this is an easy one. All you have to do is write a program.

Here is what it does:

The user is given a list of cards which are arranged in columns. He/She must choose a card and keep it in mind. Through repeated shuffling, the program will ask him/her to identify the column in which the card is. In the end the program tells the user his/her card. The cards in the columns are randomly selected into the column, that is, you can’t decide the column in which a perticular card goes.

WARNING– I have the source code that’s available on the net for this, so don’t try to give me gum.

—- Bloodfist out.

SpokesBlah Logs On

SpokesBlah Logs On

Greetings from your officially unoficial SpokesBlah.

I would just like to point out that I’m not planning to sit on my ass and do nothing. I shall, indeed, be quizzing, speaking for exun, and I shall also be assiting in Talent Hunts, along with Presidents Sirs.

The Report of The Meeting

Let’s keep it plain and simple. Most of the members showed up. This log was discussed and the URL was given to all members, and if anyone’s smart enough to log on to www.exunclan.com, they’ll be able to make their way here.

So, anyway, this site serves the following purposes:

– Serve the Exun members with news about upcoming events and competitions (including intra-school events and meetings)

– It’s a place where we will post Quizzing, Programming questions so that Exun members can hone their skills.

– Submit Reports like this one for the Exun community (and basically anyone else who cares to read)

– A place where any Exun member can post an entry and be heard by everyone else. Comments help to communicate between authors and readers.

Apart from that, we announced that each Class (from VIII to XII probably) would be having a Domain Square representative who would be incharge of advertising and promotion for that class. This will help us make Exun kind-of object-oriented and easier to handle, especially in these gaming events in which the participation is large. By object-oriented, I mean to say that each person at his/her level gets his/her duties done and then reports to his/her superior. Just that. The superior shouldn’t have to know what the person is doing or how he’s doing it.

Maanick Nangia discussed his Project Billboard which should see growth over the next few months.

Exun made a call for new talent for the group, people who are not only skilled at what they do, but more important, sincere, assiduous and interested.

Oh yes, quite an important thing was that member photos got taken and the member list got updated, which shall be reflected on the website soon.

Mukesh Sir stressed the importance of the fact that Exun members need to keep interacting with each other, not only for the sake of it, but also in that it gives meaning to the fraternité and everyone learns something or another from someone else.

Every Exun member shall be delegated tasks and given deadlines. These tasks and deadlines will be posted on ln(exun).

That’s all folks

–Karan

President, I say

Pan-Exun Meeting on 29th April

Dear Exun Member

There will be a meeting of all Exun members on the 29th of April, 2004 starting at the beginning of Break that day in Computer Lab IV. I’m sure you’ll be able to spare a few minutes for the Clan.

There will be discussion on many topics including Domain Square, the new Model United Nations Conference, etc.

Please be there, and inform any other Exun member you know.

–Karan
President of the Exun Clan

Welcoming The SpokesBLAH!

Taadaa!! Exun has a new Post which in formal terms is Spokesperson of Exun but in everyday terms He(He as the person holding the post) is Going to be known as SpokesBLAH!. May I Introduce Bhavya Khanna (The Guy who thinks every Exun Member is a Nutty Computer Geek)as a Formal member of Exun. Bhavya had requested a welcome on the Natural Log of Exun so he has it now.(Booo! Hisss! Who needs him? Boo! Blaaaah!) Bhavya will also be a part of the Quizzing Team.

There is also a near Dormant member of Exun. She is from Class XII and she s the 3rd senior programmer. Her Name is Swati Tuteja. She is Welcomed too!