Showing posts with label ACM. Show all posts
Showing posts with label ACM. Show all posts

Again it's 6:00 am ...
i'm saying : "es7o ylla 3shan 3wzen nnzl nftar we ntla3 bsor3a nktb sf7et el math fe el library"
they woke up .. my hand is in bad state so i didn't participate in writing ..
we finished writing it then attached it to our library (3 typical versions)

We were late so we took the last Bus - which wait every last person to go .. so we arrived at the end of the talk of Bill Boucher (the executive director of ACM ICPC World Finals)
he was very funny -- if you forgot your ID so you have to do 10 "d3't" and he has to put his shoes on your t-shirt

one of the judges forgot his ID and he had to do so :D

it's dress rehearsal time (Practice session - like a demo contest with real problems so they can test the Contest environment)

Some rules you have to hear .. i heard But the funny thing that the speaker was Bill Boucher and he is so funny
one thing he said :"you have to be here with your t-shirt as outer layer and your badge - Don't bring any other thing"
so contestants asked them and he said "you can of course have your glasses and your totem also"
again contestants asked him about pants :D and he said " it's not important the most important thing is your badge and your t-shirt so if you don't want to wear pants :D you don't have too, But some marshals(runners) may not like that :D"
it's 9:30 am, it's the time to start the practice contest ... we started to solve and we managed to finish the three problems we had .. and got a good rank

we were happy for our performance and Dr.Salwa & our coach started to believe that we are gonna make a new achievement in the real contest


After the rehearsal(12:00 pm) we went to have our lunch at the university dining hall (the same place as the previous day)

From 1:00 pm to 4:00 pm there was "IBM Fun Activities"
it was a very funny activities they told us that every team will have to finish some games.
this activity was consist of 3 levels:

The first level is solving easy sudoku and making 4 cars .. of small peaces they gave to us (as my hand was not well i took the sudoku and they took the cars .. after i finished my suduko i was helping them in making these 4 cars)
The second level (after finishing the first) solving medium sudoku and making a horse toy and another big toy too ( i solved the sudoku and then helped them)

after that,
The Third level: solving Hard sudoku and making a real bicycle :D -- again i solved the sudoku and tried to help then on the bicycle


We finished all three levels and moved to "IBM Technology show case"
during the "IBM show case" they held a contest between all continent - a strange contest they chose from every continent contestants 5 so they could represent their continent and i was selected in the team of EuroAfrica.
The questions was strange "i.e. telling a story then asking what is the expected number of cars that will be in china in 2020"
we were close to win but we didn't - it finished with score 4:3:1 (our team was 3)


After that we went back to our hotel, have our dinner -- watched the ICPC challenge Finals
then went to our room so we could sleep.

-----------------------------------------------------------------------

it's again 6:00 am - the ICPC world finals day.
it was a very strange day ... none of us was in good mood and we all lost our concentration.
we never did that bad in a contest - we participated as a team together in more than 60 contests But that was the strangest - problems were easy but we didn't manage to solve more than one problem (i think if we were in form we would solve 5-6 problems in this contest)

strange situation that in the contest we faced a problem that we have solved one like it before - But during the contest we couldn't - after the contest finished (on the same minute we said the solution was "Grid Compression") that was strange .. But "thanks Allah i'm sure that is the best for us"
after the contest i wasn't in mood, i didn't know how could i look in my coaches face. But i believed that our real level qualify us to solve more than 5 problems and that was because Allah doesn't want us to do that and that was the best for us to do so. so i said "el7mdllah" and moved on.

At the end of this day there was closing ceremony it has great shows and i enjoyed it.



Here we are,
The third day was full of actions.
it was the opening day of the World Finals.
the schedule is full, we managed to participate on all events (coach & Dr.Salwa asked us not to.. )

.. as usual the day started by waking up at 7:00 am to have our breakfast ... then we had to go quickly to our rooms to wear the heavy clothes to start the activities
at 8:00 am the buses started to move to HEU (Harbin Engineering University)
at 8:30 am the opening ceremony had started, first they introduced all the teams, they sorted all the teams then introduced them on the stage-after the introducing every team moved to the seats (they gave us a map to the hall which show where is our seats)
then the ceremony started, i liked the 12 girls bands too much, it was a great experience to see Chinese art (live)


the ceremony lasts two hours after that we have to move to the library team area so we know our place in the contest and get our t-shirts and hear some rules :D

while i was in my way to the team area, i was walking with the coach's mother because her shoes was not prepared to walk on ice .. But unfortunately she fall and take my hand with her, so my hand got hurt (2 times)



we moved to the contest area .. and took our t-shirts then went to the dining hall to have our lunch - one of the strangest launches i had ever had .. (let the pictures describe it instead of me)

it's now 1:30 pm and we have to go to ICPC snow Park so we start the activity of the ICPC snow sculpture

ICPC snow sculpture : it's a competition which the teams compete to make the best letter in the sentence " ACM International Collegiate Programming Contest Harbin Engineering University "
they assign each letter to 2 teams, so we had to work with North Texas university to make the letter 'L'

we managed to make it like L of titres game and worked for around 3 hours in it :D, i think we made a good one (judge it from the pictures)


- I worked to hard and forced my hand to work, so after this activity my hand was hurting me too much

We had to go back to the hotel have our dinner then go to the ICE SCULPTURE ( i have seen many pictures about it so i really wanted to see it)

BUT :S:S
my hand was hurting me too much .. i started to ask about first aid in the hotel but they were helpless .. they told me to go to the hospital to do X-Ray to now either it's fine or not
i told them it's not broken , i know But they said that i must go to the hospital and told me to take a taxi to the hospital ... Amr & Sadek let the buses too and offered to go with me to the hospital - i was so sad that i'm not going to attend the ice sculpture

Thanks to Allah we found a student (i can't pronounce his name so i'll call him M) who worked as a reporter for the university he was soo helpful and he went with us to the hospital and deal with the doctors and helped us too much

I had the X-ray and the doctor told me that my hand is not broken - i just has to put a medicine and relax it for 2 weeks ( he is kidding the contest is after tomorrow , that's what i told my self)
then M take the name of the medicine and bought it to us and bought also a bandage and we took a taxi to the hotel again..

It was 9:30 pm, the buses left the hotel at 8:30 and they will be back at 10:00 pm
M offered us to take a taxi to the ice sculpture and he will go with us and guide us there so we can see as much as we can.

So we take a taxi and went, it was around 9:50 and we are there he told us that we have 30 mins to play :D and we enjoyed this 30 minutes as much as we could, we thanked him lot then take the buses to hotel again.

We were very tired so once we reached our rooms we fall asleep.

sorry for not keeping you updated day by day ..
But the blogger doesn't work on china and i couldn't find chance to do as i did on the first topic.
---
I'm back now (home sweet home) but i'll complete this dairy so i'll now talk about day2 in Harbin

This day was amazing we wakeup early at 6:00 am as we have to have our breakfast - it was a good breakfast i had (salad, bread, cake, noodles, tea & apple juice)
(kol shwya w7da tege t2olna "coffee or tea :D" mrra a2ol tea we mrra coffee :D + kanet b2a kaman btege t2olna "excuse me" fa a2om ana rage3 lwra t2om hya tfrsh el mndel 3la rgle 3shan mw23sh 3la hdome hehe)

after the breakfast we moved quickly to our suite :) then my team mates went back to sleep but i couldn't so i wrote my first blog topic (day1) then @ 12:01 pm we went to the dining hall to have our lunch (start to have strange things :s i tried sushi :s and it's very very bad - so i decided not to eat sea food there
After that we changed our clothes wear the ice clothes and moved to the bus (elcoach mrdesh yege m3ana)

It was a trip to the snow sculpture
Harbin has the biggest and the best snow sculpture in the world

That was very new to me to see snow what about seeing that huge amounts and extraordinary beautiful shapes made out of snow :D - it was a great experience that i had.

the problem we had this day that the camera's battery didn't last more than 30 minutes i don't know why exactly but it seems that this extremely cold weather ( this day it was -35) affect the battery of the camera, but because there were many wonderful views i started to use my mobile camera, i'll not talk about what happened there but i'll let the pictures talk :D












After that we decided to enter a coffee shop to get some warm :D - but it was a very wrong decision after we went out again ... it was soooo cold -- we just had a hot drink so we are warm inside but it's very cold outside so we decided to go to the bus (it was around 5:00 pm) and we was very tired...

the buses took us to the hotel (Shangri La) we changed our clothes then went to the dinner hall we had a strange dinner (strange chicken and beef ... also i ate noodles - Amr ate "ghazl el bnat") and there was a the snow sculpture orientation (they explained to us what should we do in the next day and what is the letter will our team made of snow next day)

That was a very hard day - i was soo exhausted so once we went to our suite i fall asleep



hello , long time no posts
but you know i have been doing my best in ACM training last 2 months "ya rab yege fyda"
I have decided to blog every day of this wonderful trip to share with you my joy and happiness.
So lets start with the (longest trip i have ever made)

31/1/2010
my flight was @ 10:30 pm Cairo time - i have to go early because there is a match between egypt and Ghana (caf) . so i left my home @ 6:00 pm (the match starting time) and i reached the airport @ 7:15 pm then started to meet my team - quickly we went to the counter and .......

it's 11:00 pm Cairo time (in the plane) - i tried to sleep i couldn't .. sadek is sleeping and amr is talking with dr. Salwa

1/2/2010
it's 8:00 am Cairo time- still i can't sleep and amr and Dr.Salwa still talking :D - i swapped the seats with sadek to be beside the window - the view is wonderful

it's 9:00 am Cairo time (3:00 pm @china) we have arrived to Beijing we claimed our Baggages then we went to get our tickets for the next flight (air china flight) and i have lost my jacket :'( "it was new and it was very thick, i have bought to wear in Harbin"

our flight to Harbin is @ 6:10 pm - so we have to wait -- we take a tour in the airport which was soo cool
we found a water and coffee machine i liked this machine very much as it has cups made of paper
you take the paper and you can put the water in it :D - i insisted to take a picture w in front of it
then we move to the gate and i have slept about 1 hour




it's 6:30 pm - in the plane going to Harbin .. "kolo bytklm sene" their English is very bad
the even the tv was in Chinese and all the channels was also in Chinese "D:

then they came with the food ... asked us what do you want " 7aga da ghreba Or noodles with chicken" so we all take noodles :D

it was very very bad meal .. i was hungry i ate all the noodles but could't eat the salad "kan t3mha ghreb"

we have arrived .. then we took our baggages then (my bags' hand had been broken :S) "yade el nella"

we are soo late and the registration will end @ 10:00 pm - it's now 8:30 pm
we have to go quickly to the hotel we have many bags and we can't take them all with us and the bus will move @ 12 pm - so we took a van with (240 RMB = around 200 L.E) and i went (with amr) to outside the airport to put the bags on the Bus
it was -25 C -- it was soo cold and i was freezing ( no jacket - only ice-cap, sweatshirt and scarf)
we felt like some body with no ears and fingers -- and also the floor with was very slippery because of ice - and my glasses were full of "shbora"

it was a very exciting painful and funny minutes we had(me and amr) - but they passed :D
then we moved to the van and went to the hotel - we were in a rush as it was 9:30 pm and we had only 30 minutes to complete our registration.

after the registration we went to the rooms then "Fan" (Chinese volunteer) knocked the door, to tell us that our bags had arrived so i went with her to outside (this time i was only wear the sweet shirt no gloves and no ice-cap and no scarf) other painful moments - but they also passed.

it was a great day full of fun and painful moments.

PS: Thanks to manaal for letting me to write my blog on her pc (blogger ma2fool fe china!!!)








الحمد لله حمدا كثيرا طيبا مباركا
الحمد لله الوهاب الرازق الفتاح العليم
الحمد لله الكريم الرقيب المجيب
الحمد لله القادر المقتدر المقدم المؤخر

بجد مش عارف احمد ربنا كفايه و حاسس إني مهما قلت أو حمدت أو عملت مش كفايه

On Tuesday 24/11/2009 @ 10:00 am The Arab & North Africa Regional ACM International Programming Contest had started

And After 5 hours of solving and thinking and after "twfe2 kber gdan mn rbna" we managed to solve 8 problems in 10 submittions

Which allowed Us to gain The First place and The Solid Programmers award




... really i have many many stories to tell, and i'll write them one after other on the blog isAllah.

But now,I want to thank some people who really was the main reason after Allah :

My Mother & sisters & family they really are the reason for this win .. for their support and praying for me

The great Coach : Mohammad Mahmoud Abd el Wahab (MMAW) "really can't find words to express how much i'm grateful to him" But he did a great effort with us and if they would only gonna give the honor to only one that will be the coach

My Team mates (amr samir, ahmed sadek) you are my mates and friends and i'd never have achieve that with out you

MMAW & Cairo Golden eagles teams that cup belongs to all of us the 9 of us, you did great, and you deserved to win, and i think you are really better than me and it's just the luck and(twfe2 rbna elle fra2 elmrra de)

Ayman - Hagar - Sara Amr (my older sister) - Mohammed sief -Noha - Marwa for their great support

My friends : khaled hafez, khaled abdelrazik, Dina, abd elrahman - essam - solom - zaki
My students and fellows who gave me the big big motive to inspire them and try to win

"el7mdllah"
and see you in the next topic "talking about stories of the ANARC 09"




SA,

it's my first time to write a technical topic on the blog, as i wanted this blog to be my personal not technical pages .. discuss my life and my opinions
But ....
5 days ago. in my ACM training Eng. M.M.A.Wahab told me that:
"There are the same number of rational numbers as natural numbers" (how .. rational are more??)
"There are the same number of Integer numbers as natural numbers" (Are you kidding me ?)

i didn't believe he tried to convene me, But i didn't...
After i went back to home, i started to Google that.. and i opened the discrete mathematics book to check that.

It was a big shock to find out that is true... i found theorems and proofs about that..
so i managed to proof that here.
--------------------------------------------------------------------------
Before starting my proofs i have to define some terminologies:

1- Function:
In mathematics F(X) said to be a function where for every X in it's domain it produce a value on corresponding co-domain

2- Injective function:
In mathematics injective function is a function which associates distinct arguments with distinct values; that is, every unique argument produces a unique result (wikipedia)
3- Surjective function:
In mathematics, a function f is said to be surjective, if its values span its whole co-domain; that is, for every y in the co-domain there is at least one x in the domain such that f(x) = y (wikipedia)
4- Bijective function:
In mathematics, a bijective function is a function f from a set X to a set Y with the property that, for every y in Y there is exactly one x in X such that f(x) = y.
Alternatively, f is bijective if it is injective & surjective
(wikipedia)

if f(x)->y is bijective then the cardinality of the domain X = the cardinality of the co-domain Y
-----------------------------------------------------------------------------------

So lets move to our proofs.
1- "There are the same number of rational numbers as natural numbers"

Assume Q is rational numbers, N is natural number
we must exhibit a one-to-one relationship"bijection" between Q & N
we will write Q as :

1st row denominator 1, 2nd row denominator 2 .. etc.

we can see that as a rectangular array that contain all rational numbers .. But there are some repetitions like 1/1 & 2/2 ....

Now we will try to map every rational number to a natural number (counting)


this is like a ZIGZAG shape i have started from
0 associate it with 0
then
1/2 associate it with 1
then
-1/1 associate it with 2
... etc.(neglect repeated values)

using this method we can give every rational number a natural number..
and the correspondence will be like that :


and that matching will cover all of Q and all of natural numbers.

Is this relation Injective ??
yes it's injective as for every number in natural numbers there exists only one value of rational number it could match
Is this relation Surjective ??
yes, as there is no value in the co-domain rational number that can't be mapped to one natural number

So this relation is bijective --> then the cardinality of the domain = the cardinality of co-domain
|Q| = |N| #R.T.P
-----------------------------------

2- "There are the same number of Integer numbers as natural numbers"

Let us define functions :

a- abs(X) = X if(X>=0)
abs(X) = -1*X if(X<0)

b- sign(X) = 1 if(x>0)
sign(X) = 0 if(X<=0)

F(X) --> 2*abs(X) - sign(X)
where X belongs to Integers and F(X) belongs to natural numbers
F(0) = 0, F(1) = 1, F(-1) = 2, F(2) = 3 ....


  • This function is Injective where every element in Co-domain(Natural Numbers) there exists only 1 Integer number it could match
  • This function is Surjective where every element in Co-domain is covered using a corresponding value in domain

So this function is bijection "Cardinality of Co-domain = Cardinality of Domain"
then
|Integer Numbers|
= |Natural Numbers| ..... #R.T.P

DONE :D

what a mess ?? How can the cardinality of Integer Numbers = Cardinality of Natural Numbers
are Negative Numbers don't exist :S

But ... these proofs are right and you can find it on discrete and mathematics book when you search about countable sets & Contar's thearom

But i think that's all because INFINITY is not defined.. if infinity was defined all these theorem and proofs will be wrong...

BUT FOR NOW THEY ARE TRUE

Hello,
long time no see,
you know it's midyear vacation.

PS: "it's called midyear vacation, But it wasn't my midyear vacation as i had many many many things to do and I'm going to talk about that on a later post isAllah"

so, lets start this topic :

A week ago, i was at my coach's home, we were talking about
TopCoder forum topic called : "you know you are a TopCoder when .."

He actually was talking about a situation happens to us all (C++,JAVA programmers):
when we are chatting or writing statements any where "we terminate our statements with semicolon instead of dot"

The important things is, when i went home this night i open the
TopCoder forum and start looking for this topic, then i found it start reading it.
i liked this topic very much it's amazing really, this topic had started from 2003 and still active till now.

I book marked it and every day i check it and read few pages.
here are some quotes i find in this topic and liked them very much:



You Know You are a TopCoder when :

... When you see a sunrise and think "a flood-fill algorithm would have done that quicker";
... When you include your
TopCoder rating changes in your weekly progress reports to you manager;
... When you think red > yellow > blue > green > gray, and orange is a special color;
... When you believe that "
TopCoder - The Movie" would be a major box office success;
... When you start signing your emails with
TopCoder Handle only;
... After paste your info into any web form you look for button "Compile";
... Instead of asking for directions, you just DFS;
... When you go out the balcony and see only red in front of your eyes;

... When part of your "life plan" is to improve your "color";
... When you are constantly removing the final t when typing in;
... When you carry a
TopCoder code template in your wallet;
... When your friends call you by your
TopCoder handle and not by your name;
... When the first thing your mother asks on a visit is if your rating is okay;
... When you declare variables during your math classes;
... When you believe "all time" started with SRM1;



Of course you know you are a TopCoder when you terminate all you statements with semicolon and when your best hero is Petr :)))

see you next post,
mRefaat

Followers