Skip to main content

Posts

Measuring Efficiency of Algorithms

Hello it is long time since last time I wrote a blog post , I'm Okay and passion to write more and more posts , I'll talk about measuring efficiency of Algorithms . there exist two approaches : using the Concept of bench mark we focus on two aspects : is the output of the program correct ? how much time and resources are needed by the program to produce the correct output? estimate ! DON'T MEASURE , and we will talk about this approach in details in the next sections.  discussing approach (bench mark) cost money , resources and time, it used for small problems or execution time relatively  small ,this push us - computer scientists not me of course - directly to find  a new way , estimation of execution time. we gonna use a new term " Asymptotic Analysis   ": Asymptotic analysis is an analytical approach to analyze the running time of the algorithms under the following assumptions  : ...

5 Steps To Be in The Top 50 List

Hi , Um Ahmed Ghazey :D , I was Student in Faculty of Computers and Information Cairo Univ. for a while, in my first year in the faculty I had been failed in One subject out of 12 it was Math I , the matter really was a strange , I used to success with high grade , how I could tell my parents with the grade , no way I hided the matter about a month until my father asked me" what you did in the exams ?" I have no chance to lie , I told him the fact , i felt sorry for the shock , but i decided to win all my battles against the faculty not surrender for the routine. the story began from here , how can I enter the Top Fifty List , I must follow successful students steps , i started asking them about many things, and here is the conclusion of my questionnaire  : Step #1  Select Good Friends ( Team ) Teamwork is the ability to work as a group toward a common vision, even if that vision becomes extremely blurry.  ~Author Unknown the most important thing in your tea...

Recursion

Recursion is a programming technique which function calls itself , this seems strange , however it is one of the most interested and effective technique in programming. it helps you write code in less statements and provides unique conceptual frame work to solve problems. lets discus some problems to know how it works : first example Triangular Numbers : it is series like : 1,3,6,10,15,21........ etc our program should get the nth term in the series, the numbers in this series called triangular numbers due to they can be visualized as a triangle. triangular numbers fig 1 finding the nth term using a loop see this figure : loop adding 1+2+3+4 and so on code is easy  , a loop will add numbers from n to 0 like this int triangle(int n) { int total = 0; while(n > 0) // until n is 1 { total = total + n; // add n (column height) to total --n; // decrement column height } return total; } it easy enough and for sure it is fast . before we start the recu...

Hash tables

Hash tables (I) A  hash table is a data Structure that offer very fast insertion and search sometimes deletion almost in O( 1) in the best cases.   O( 1) means few machine instructions to finish the operation   Advantages of Hash Tables : fast  easy to code Disadvantages of Hash Tables :   based on Array (Array is fixed length data structure) performance may be degraded catastrophically when the table is full. no convenient way to visit item n hash table. What is hashing ? hashing means convert range of key values into range of Array index. for example : suppose you are writing a program to access  employee records in small company say 1000 employees . requirement : database used one mega byte  fastest access to any individual record employees are seldom laid off and even happen their records still exist.  every employee has been given number from 1(from the founder) to 1000 (the most recent emp...

Sigmoid Function

Hello all, Sigmoid Function or Logistic Function , it is used in Machine Learning problems for the purpose of learning (Neural network ) on curves. its range between ]0,1[ it is horizontal asymptotic on 0 and 1, because of its range between 0 and 1 it is used in classification using threshold for example if we take 0.5 as a threshold  values greater than 0.5 are considered Ones and  values less than or Equal  0.5 considered 0. it has the following formula :   and it shape as following : from wikipedia  so it accept differentiation over its domain unlike Step Function. differentiation of sigmoid function :  I finished the article , i hope you understand it . Thanks for your time and effort if you like it share and follow me :)

XML tutorial

SA one of my objectives for this article making you curios to know about XML , and make you search the web for more info about it , and i hope do that , lets start. what is XML stand  for ? e X tensible  M arkup L anguage. it is used to transport data over the internet , you can invent your own tags , no restriction . for example if you want transport data for weather news: < weathernews > < new > < city > Cairo < / city > < max >36< / max > < min > 22 < / min > < / new > < / weathernews > XML   consist of main three component : tagged elements. attributes. text. lets see example: < bookstore > < book category="CHILDREN" > < title lang="en" > Harry Potter< /title > < author>J K. Rowling< /author > < year >2005< /year > < price>29.99 < /book > < book category="WEB" > < title lang="en" >Learn...

Introduction to Machine Learning

Salmo Aliko . today I'll write about Machine Learning  , it is interesting topic. I put assumption I'm talking to computer since students. first of all , many of us dreamed to make robot, auto detection for missiles and treat it automatically and many awesome dreams, but we didn't know how achieve it. let me start with the definition and mentioning some of ML -M achine L earning -  applications . What is Machine Learning?   is the ability to learn without being explicitly programmed   and if we like mentioning more formal definition it is   A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P, if its performance at tasks in T, as measured by P, improves with experience E. application of ML : Computer Vision. Natural Language Processing. Game playing. Market segmentation. Medical Diagnosis.   Stock Market Analysis. Search Engines. Robo...