<10>[jaca:/home/mac/yoshi/www/mac338/exx/ABBs] > ll total 23 -rw-r--r-- 1 yoshi mac 539 Jun 20 07:05 Item.c -rw-r--r-- 1 yoshi mac 548 Jun 20 07:05 Item.h -rw-r--r-- 1 yoshi mac 913 Jun 20 07:05 Makefile lrwxrwxrwx 1 yoshi mac 10 Jun 19 11:34 ST.c -> prog12.8.c -rw-r--r-- 1 yoshi mac 641 Jun 20 07:06 ST.h -rw-r--r-- 1 yoshi mac 486 Jun 20 07:05 bla.sh lrwxrwxrwx 1 yoshi mac 23 Jun 19 10:37 gb_flip.c -> ../quicksort1/gb_flip.c lrwxrwxrwx 1 yoshi mac 23 Jun 19 10:37 gb_flip.h -> ../quicksort1/gb_flip.h -rw-r--r-- 1 yoshi mac 2448 Jun 21 01:02 main.c -rw-r--r-- 1 yoshi mac 1092 Jun 6 08:29 prog12.2.c -rw-r--r-- 1 yoshi mac 3532 Jun 20 20:42 prog12.8.c -rw-r--r-- 1 yoshi mac 5691 Jun 21 01:40 tmp.txt <11>[jaca:/home/mac/yoshi/www/mac338/exx/ABBs] > make main gcc -g -Wall -c Item.c gcc -g -Wall -c ST.c gcc -g -Wall -c gb_flip.c gcc -g -Wall -c main.c gcc -g -Wall -o main Item.o ST.o gb_flip.o main.o -lm <12>[jaca:/home/mac/yoshi/www/mac338/exx/ABBs] > main -1 2 7 1 8 2 8 1 8 2 8 4 5 9 0 4 5 2 3 5 4 0 (ocorreu 1 vez) 1 (ocorreu 2 vezes) 2 (ocorreu 4 vezes) 3 (ocorreu 1 vez) 4 (ocorreu 3 vezes) 5 (ocorreu 3 vezes) 7 (ocorreu 1 vez) 8 (ocorreu 4 vezes) 9 (ocorreu 1 vez) Height: 3 Height/log(20): 1.00142 Ave depth: 1.88889 (Ave depth+4)/(log(20)+.57721)(1+1/20): 1.56971 <13>[jaca:/home/mac/yoshi/www/mac338/exx/ABBs] > main -1 1 2 3 4 5 6 7 1 (ocorreu 1 vez) 2 (ocorreu 1 vez) 3 (ocorreu 1 vez) 4 (ocorreu 1 vez) 5 (ocorreu 1 vez) 6 (ocorreu 1 vez) 7 (ocorreu 1 vez) Height: 6 Height/log(7): 3.08339 Ave depth: 3 (Ave depth+4)/(log(7)+.57721)(1+1/7): 2.42755 <14>[jaca:/home/mac/yoshi/www/mac338/exx/ABBs] > main -1 4 2 1 3 6 5 7 1 (ocorreu 1 vez) 2 (ocorreu 1 vez) 3 (ocorreu 1 vez) 4 (ocorreu 1 vez) 5 (ocorreu 1 vez) 6 (ocorreu 1 vez) 7 (ocorreu 1 vez) Height: 2 Height/log(7): 1.0278 Ave depth: 1.42857 (Ave depth+4)/(log(7)+.57721)(1+1/7): 1.88259 ********************************************************************** Acabo de perceber que a semente dada abaixo (2718281828) é muito grande (maior que um long). Isto pode dar confusao quando voce tentar reproduzir estes testes. ********************************************************************** <15>[jaca:/home/mac/yoshi/www/mac338/exx/ABBs] > main 7 -1 2718281828 1 Average height: 4 Ave height/log(7): 2.05559 Ave depth: 1.85714 (Ave depth+4)/(log(7)+.57721)(1+1/7): 2.03122 <16>[jaca:/home/mac/yoshi/www/mac338/exx/ABBs] > main 7 -1 2718281828 3 Average height: 4 Ave height/log(7): 2.05559 Ave depth: 1.95238 (Ave depth+4)/(log(7)+.57721)(1+1/7): 2.06424 <17>[jaca:/home/mac/yoshi/www/mac338/exx/ABBs] > main 7 -1 2718281828 100 Average height: 3.68 Ave height/log(7): 1.89115 Ave depth: 1.92429 (Ave depth+4)/(log(7)+.57721)(1+1/7): 2.0545 <18>[jaca:/home/mac/yoshi/www/mac338/exx/ABBs] > gtime main 7 -1 2718281828 1000 Average height: 3.668 Ave height/log(7): 1.88498 Ave depth: 1.91714 (Ave depth+4)/(log(7)+.57721)(1+1/7): 2.05202 0.11user 0.01system 0:00.21elapsed 57%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+0minor)pagefaults 0swaps <19>[jaca:/home/mac/yoshi/www/mac338/exx/ABBs] > gtime main 7 -1 2718281828 10000 Average height: 3.6663 Ave height/log(7): 1.88411 Ave depth: 1.92267 (Ave depth+4)/(log(7)+.57721)(1+1/7): 2.05394 1.06user 0.01system 0:01.07elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+0minor)pagefaults 0swaps <20>[jaca:/home/mac/yoshi/www/mac338/exx/ABBs] > gtime main 10000 -1 2718281828 1000 .......................... Average height: 30.232 Ave height/log(10000): 3.2824 Ave depth: 15.5654 (Ave depth+4)/(log(10000)+.57721)(1+1/10000): 1.99881 455.82user 0.06system 7:37.00elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+0minor)pagefaults 0swaps <21>[jaca:/home/mac/yoshi/www/mac338/exx/ABBs] > gtime main 10 10 213 1 ......................................... Average height: 4 Ave height/log(10): 1.73718 Ave depth: 2.2 (Ave depth+4)/(log(10)+.57721)(1+1/10): 1.95721 0.00user 0.02system 0:00.03elapsed 66%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+0minor)pagefaults 0swaps <22>[jaca:/home/mac/yoshi/www/mac338/exx/ABBs] > gtime main 23 365 213 1 ... Average height: 6 Ave height/log(23): 1.91357 Ave depth: 3.43478 (Ave depth+4)/(log(23)+.57721)(1+1/23): 1.91909 0.00user 0.02system 0:00.02elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+0minor)pagefaults 0swaps <23>[jaca:/home/mac/yoshi/www/mac338/exx/ABBs] > gtime main 23 365 13 1 . Average height: 7 Ave height/log(23): 2.2325 Ave depth: 3.43478 (Ave depth+4)/(log(23)+.57721)(1+1/23): 1.91909 0.01user 0.01system 0:00.02elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+0minor)pagefaults 0swaps <24>[jaca:/home/mac/yoshi/www/mac338/exx/ABBs] > gtime main 23 365 3 1 Average height: 11 Ave height/log(23): 3.50822 Ave depth: 4.86957 (Ave depth+4)/(log(23)+.57721)(1+1/23): 2.28944 0.01user 0.01system 0:00.02elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+0minor)pagefaults 0swaps <25>[jaca:/home/mac/yoshi/www/mac338/exx/ABBs] > gtime main 23 365 31 1 .. Average height: 7 Ave height/log(23): 2.2325 Ave depth: 3.73913 (Ave depth+4)/(log(23)+.57721)(1+1/23): 1.99765 0.01user 0.01system 0:00.02elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+0minor)pagefaults 0swaps <26>[jaca:/home/mac/yoshi/www/mac338/exx/ABBs] > make clean /bin/rm -f *~ \#~ .\#* *.o *.log *.dvi *.toc core a.out <27>[jaca:/home/mac/yoshi/www/mac338/exx/ABBs] >