Appendix
7.1
Matlab code
7.1.1
Dijstra’s algorithm
function [spcost, path] = dijkstra9(costmatrix, s, d)
%=================================================================== % inputs:
% n*n costmatrix
% n: the number of nodes in the network; % s: source node index;
% d: destination node index;
%=================================================================== n=size(costmatrix,1);
% vector, set of visited vectors S(1:n) = 0;
% it stores the shortest distance between the source node and any other node; dist(1:n) = inf;
% Previous node,
%informs about the best previous node known to reach each network node prev(1:n) = n+1; dist(s) = 0; while sum(S)~=n candidate=[]; for i=1:n if S(i)==0 candidate=[candidate dist(i)];
else candidate=[candidate inf]; end end [u_index u]=min(candidate); S(u)=1; for i=1:n if costmatrix(u,i)>0 if(dist(u)+costmatrix(u,i))<dist(i) dist(i)=dist(u)+costmatrix(u,i); prev(i)=u; end end end end spcost = dist(d); path = prev
7.1.2
Floyd-Warshall algorithm
function [new, path] = floyd(costmatrix)
%==================================================== % inputs:
% n*n costmatrix
%n the amount of nodes in the network
%==================================================== n=size(costmatrix,1);
%Define the elements of the weight matrix as w %and the elements of the path matrix as pred for u = 1:n for v = 1:n w(u,v) = costmatrix(u,v); pred(u,v) = v; end end
%Test to see if inequality hold for v1 =1:n
for v = 1:n if w(u,v1) + w(v1,v) < w(u,v) w(u,v) = w(u,v1) + w(v1,v); pred(u,v) = v1; end end end end
%Construct the new weight and path matrices new = w;
Bibliography
1. Adam, G. (2010). Mathematics and statistics for forensic science. UK: John Wiley & sons Ltd.
2. Akin, LL. (2004). Directional analysis of blood spatter at crime and accident scenes for the private investigator. Austin Texas.
3. Balakrishnan, V.K. (1997). Graph theory. McGraw-Hill Companies, Inc. Schaum‘s outline. 1, 28-29, 120-121.
4. Beard, K.V. & Pruppacher, H.R. (1969). A determination of the termi-nal velocity and drag of small water drops by means of a wind tunnel. University of California.
5. Behrooz, N. (2009). Bloodstain pattern analysis for determination of point of origin. University of Toronto.
6. Berclaz, J., Fleuret, F., Tu¨retken, E. & Fua, P. (2010). Multiple object tracking using k -shortest path optimization. IEEE. 1-16
7. Bevel, T. & Gardner, R.M. (2008). Bloodstain pattern analysis: With an introduction to crime scene reconstruction. Taylor & Francis Group. USA.
8. Bunday, B.D. & Garside, G.R. (1987). Linear programming in pascal. Edward Arnold (Publishers) Ltd. 3-4, 18-149.
9. Clapham, C. & Nicholson, J. (2009). Concise dictionary of mathemat-ics. Fourth edition. Oxford university press.
10. Cecchetto, B. & Heidrich, W. (2011). Probabilistic inverse dynamics for blood pattern reconstruction. University of British Columbia, Canada.
12. Edelberg, M. (1970). Integral convex polyhedra and approach to inte-gralization. Thesis for Doctor in Philosophy. MIT.
13. Hershberger, J., Maxel, M., & Suri, S. Finding the k -shortest simple paths: A new algorithm and its implementation. SIAM Journal, 3(4): 27-36, 2007
14. Holterman, H.J. (2003). Kinetics and evaporation of water drops in air. Wageningen UR.
15. Hughes, W.F. & Brighton, J.A. (1999). USA: Fluid dynamics. McGraw-Hill Companies, Inc. Schaum‘s outline.
16. Hulse-Smith, L., Mehdizadeh, N.Z. & Chandra, S. Deducing drop size and impact velocity from circular bloodstains. Journal of forensic sci-ence, 50(1): 1-10, 2005
17. Jongen, H.T., Meer, K. & Triesch, E. (2004). Optimization theory. Kluwer academic publishers. 194, 233, 261.
18. Joubert, D. (2012). Adaptive occupancy grid mapping with measure-ment and pose uncertainty. Master of Science in Applied Mathematics. Stellenbosch University.
19. Kirk, D.E. (2004). Optimal control theory: An introduction. Dover publications Prentice-Hall, Inc. 55.
20. Knock, C. & Davison, M. (2007). Predicting the position of the source of blood. Journal of forensic sciences.
21. Lipschutz, S. & Lipson, M. (2007). Discrete mathematics. Third edi-tion. Schaum‘s outline. 159, 162, 201-204, 218-220.
22. Lynch,B. & Lommatsch, G. (2011). Modeling the velocity of a rain-drop.
23. Malham, S.J.A. (2010). Ideal fluid mechanics. University of Edinburgh. 24. Ng, M. (2010). A mathematical model of the velocity of a falling water
drop in air. University of British Columbia. Science one program. 25. Nordby, J.J. (2006). Basic bloodstain pattern analysis. Final Analysis
26. Nowack, L., Collins, R., Li, G., Carter, A.L., Illes, M., Gorman, V., Larocque, S., Stotesbury, T. & Yamashita, B. (2011). Journal of blood-stain pattern analysis:Computer analysis of bloodblood-stain patterns on an-gled surface.
27. Sackheim, G.I. & Schultz, R.M. (1977). Chemistry for the health sci-ences. USA: Macmillan Publishing Co., Inc.
28. Sellier, M., Baechtel, G. & Taylor, M.C. (2010). Towards modelling bloodstain formation. 17th Australian Fluid Mechanics Conference. 29. Shearer, S.A. & Hudson, J.R. (no date). Fluid mechanics: Stokes‘ law
and viscosity.
30. Spiegel, M.R., Lipschutz, S. & Liu, J. (2009). Mathematical handbook of formulas and tables. USA: McGraw-Hill Companies, Inc. Schaum’s outlines. 53.
31. Suurballe, J.W. & Tarjan, R.E. (1984). A quick method for finding shortest pairs of disjoint paths. Networks (14) 325-336
32. Swanepoel, J.W.H., Swanepoel, C.J., Allison, J.S. & Santana, L. (2011). Elementˆere statistiese metodes 4th edition. The Platinum Press. 33. Van Boxel, J.H. (1997). Numerical model for the fall speed of raindrops
in rainfall simulators. University of Amsterdam. Workshop on wind and water erosion.
34. Vanderbei, R.J. (1997). Linear Programming foundations and exten-sions. Kluwer academic publishers Boston/London/Dordrecht. 6-7. 35. Van Mieghem, P. (2011). Graph spectra for complex networks.
Cam-bridge University Press. 17.
36. Wells, J.K. (2006). Investigation of factors affecting the region of ori-gin estimate in bloodstain pattern analysis. University of Canterbury. Master of Science in Medical Physics.
37. Zarrabeitia, L.A., Aruliah, D.A. & Qureshi, F.Z. (2012). Extraction of blood droplet flight trajectories from videos for forensic analysis. University of Ontario Institute of Technology. Canada.