diff --git a/ea/project/EaVolleyballProject/OptimizationParameters.yml b/ea/project/EaVolleyballProject/OptimizationParameters.yml deleted file mode 100644 index cb18ee1..0000000 --- a/ea/project/EaVolleyballProject/OptimizationParameters.yml +++ /dev/null @@ -1,252 +0,0 @@ -!!eva2.optimization.modules.OptimizationParameters -optimizer: !!eva2.optimization.strategies.EvolutionStrategies - environmentSelection: !!eva2.optimization.operator.selection.SelectBestIndividuals { - obeyDebsConstViolationPrinciple: true} - lambda: 20 - mu: 5 - numberOfPartners: 1 - parentSelection: !!eva2.optimization.operator.selection.SelectRandom {obeyDebsConstViolationPrinciple: false} - partnerSelection: !!eva2.optimization.operator.selection.SelectRandom {obeyDebsConstViolationPrinciple: false} - plusStrategy: false - population: - - !!eva2.optimization.individuals.ESIndividualDoubleData - areaConst4ParallelViolated: false - crossoverOperator: &id001 !!eva2.optimization.operator.crossover.CrossoverESDefault {} - crossoverProbability: 0.5 - initOperator: !!eva2.optimization.operator.initialization.DefaultInitialization {} - isMarked: false - isPenalized: false - mutationOperator: !!eva2.optimization.operator.mutation.MutateESGlobal {crossoverType: intermediate, - lowerLimitStepSize: 5.0E-7, mutationStepSize: 0.1297485159812414, tau1: 0.15} - mutationProbability: 1.0 - - !!eva2.optimization.individuals.ESIndividualDoubleData - areaConst4ParallelViolated: false - crossoverOperator: *id001 - crossoverProbability: 0.5 - initOperator: !!eva2.optimization.operator.initialization.DefaultInitialization {} - isMarked: false - isPenalized: false - mutationOperator: !!eva2.optimization.operator.mutation.MutateESGlobal {crossoverType: intermediate, - lowerLimitStepSize: 5.0E-7, mutationStepSize: 0.0958088606270435, tau1: 0.15} - mutationProbability: 1.0 - - !!eva2.optimization.individuals.ESIndividualDoubleData - areaConst4ParallelViolated: false - crossoverOperator: *id001 - crossoverProbability: 0.5 - initOperator: !!eva2.optimization.operator.initialization.DefaultInitialization {} - isMarked: false - isPenalized: false - mutationOperator: !!eva2.optimization.operator.mutation.MutateESGlobal {crossoverType: intermediate, - lowerLimitStepSize: 5.0E-7, mutationStepSize: 0.10272532610948962, tau1: 0.15} - mutationProbability: 1.0 - - !!eva2.optimization.individuals.ESIndividualDoubleData - areaConst4ParallelViolated: false - crossoverOperator: *id001 - crossoverProbability: 0.5 - initOperator: !!eva2.optimization.operator.initialization.DefaultInitialization {} - isMarked: false - isPenalized: false - mutationOperator: !!eva2.optimization.operator.mutation.MutateESGlobal {crossoverType: intermediate, - lowerLimitStepSize: 5.0E-7, mutationStepSize: 0.07526296515212202, tau1: 0.15} - mutationProbability: 1.0 - - !!eva2.optimization.individuals.ESIndividualDoubleData - areaConst4ParallelViolated: false - crossoverOperator: *id001 - crossoverProbability: 0.5 - initOperator: !!eva2.optimization.operator.initialization.DefaultInitialization {} - isMarked: false - isPenalized: false - mutationOperator: !!eva2.optimization.operator.mutation.MutateESGlobal {crossoverType: intermediate, - lowerLimitStepSize: 5.0E-7, mutationStepSize: 0.09584497608040886, tau1: 0.15} - mutationProbability: 1.0 - - !!eva2.optimization.individuals.ESIndividualDoubleData - areaConst4ParallelViolated: false - crossoverOperator: *id001 - crossoverProbability: 0.5 - initOperator: !!eva2.optimization.operator.initialization.DefaultInitialization {} - isMarked: false - isPenalized: false - mutationOperator: !!eva2.optimization.operator.mutation.MutateESGlobal {crossoverType: intermediate, - lowerLimitStepSize: 5.0E-7, mutationStepSize: 0.09980168632548005, tau1: 0.15} - mutationProbability: 1.0 - - !!eva2.optimization.individuals.ESIndividualDoubleData - areaConst4ParallelViolated: false - crossoverOperator: *id001 - crossoverProbability: 0.5 - initOperator: !!eva2.optimization.operator.initialization.DefaultInitialization {} - isMarked: false - isPenalized: false - mutationOperator: !!eva2.optimization.operator.mutation.MutateESGlobal {crossoverType: intermediate, - lowerLimitStepSize: 5.0E-7, mutationStepSize: 0.11863413316848513, tau1: 0.15} - mutationProbability: 1.0 - - !!eva2.optimization.individuals.ESIndividualDoubleData - areaConst4ParallelViolated: false - crossoverOperator: *id001 - crossoverProbability: 0.5 - initOperator: !!eva2.optimization.operator.initialization.DefaultInitialization {} - isMarked: false - isPenalized: false - mutationOperator: !!eva2.optimization.operator.mutation.MutateESGlobal {crossoverType: intermediate, - lowerLimitStepSize: 5.0E-7, mutationStepSize: 0.12849025565315003, tau1: 0.15} - mutationProbability: 1.0 - - !!eva2.optimization.individuals.ESIndividualDoubleData - areaConst4ParallelViolated: false - crossoverOperator: *id001 - crossoverProbability: 0.5 - initOperator: !!eva2.optimization.operator.initialization.DefaultInitialization {} - isMarked: false - isPenalized: false - mutationOperator: !!eva2.optimization.operator.mutation.MutateESGlobal {crossoverType: intermediate, - lowerLimitStepSize: 5.0E-7, mutationStepSize: 0.11568110968515462, tau1: 0.15} - mutationProbability: 1.0 - - !!eva2.optimization.individuals.ESIndividualDoubleData - areaConst4ParallelViolated: false - crossoverOperator: *id001 - crossoverProbability: 0.5 - initOperator: !!eva2.optimization.operator.initialization.DefaultInitialization {} - isMarked: false - isPenalized: false - mutationOperator: !!eva2.optimization.operator.mutation.MutateESGlobal {crossoverType: intermediate, - lowerLimitStepSize: 5.0E-7, mutationStepSize: 0.14338098383253595, tau1: 0.15} - mutationProbability: 1.0 - - !!eva2.optimization.individuals.ESIndividualDoubleData - areaConst4ParallelViolated: false - crossoverOperator: *id001 - crossoverProbability: 0.5 - initOperator: !!eva2.optimization.operator.initialization.DefaultInitialization {} - isMarked: false - isPenalized: false - mutationOperator: !!eva2.optimization.operator.mutation.MutateESGlobal {crossoverType: intermediate, - lowerLimitStepSize: 5.0E-7, mutationStepSize: 0.08734977687266793, tau1: 0.15} - mutationProbability: 1.0 - - !!eva2.optimization.individuals.ESIndividualDoubleData - areaConst4ParallelViolated: false - crossoverOperator: *id001 - crossoverProbability: 0.5 - initOperator: !!eva2.optimization.operator.initialization.DefaultInitialization {} - isMarked: false - isPenalized: false - mutationOperator: !!eva2.optimization.operator.mutation.MutateESGlobal {crossoverType: intermediate, - lowerLimitStepSize: 5.0E-7, mutationStepSize: 0.1098773972777742, tau1: 0.15} - mutationProbability: 1.0 - - !!eva2.optimization.individuals.ESIndividualDoubleData - areaConst4ParallelViolated: false - crossoverOperator: *id001 - crossoverProbability: 0.5 - initOperator: !!eva2.optimization.operator.initialization.DefaultInitialization {} - isMarked: false - isPenalized: false - mutationOperator: !!eva2.optimization.operator.mutation.MutateESGlobal {crossoverType: intermediate, - lowerLimitStepSize: 5.0E-7, mutationStepSize: 0.1021572608823929, tau1: 0.15} - mutationProbability: 1.0 - - !!eva2.optimization.individuals.ESIndividualDoubleData - areaConst4ParallelViolated: false - crossoverOperator: *id001 - crossoverProbability: 0.5 - initOperator: !!eva2.optimization.operator.initialization.DefaultInitialization {} - isMarked: false - isPenalized: false - mutationOperator: !!eva2.optimization.operator.mutation.MutateESGlobal {crossoverType: intermediate, - lowerLimitStepSize: 5.0E-7, mutationStepSize: 0.0847210377938867, tau1: 0.15} - mutationProbability: 1.0 - - !!eva2.optimization.individuals.ESIndividualDoubleData - areaConst4ParallelViolated: false - crossoverOperator: *id001 - crossoverProbability: 0.5 - initOperator: !!eva2.optimization.operator.initialization.DefaultInitialization {} - isMarked: false - isPenalized: false - mutationOperator: !!eva2.optimization.operator.mutation.MutateESGlobal {crossoverType: intermediate, - lowerLimitStepSize: 5.0E-7, mutationStepSize: 0.08853603244786161, tau1: 0.15} - mutationProbability: 1.0 - - !!eva2.optimization.individuals.ESIndividualDoubleData - areaConst4ParallelViolated: false - crossoverOperator: *id001 - crossoverProbability: 0.5 - initOperator: !!eva2.optimization.operator.initialization.DefaultInitialization {} - isMarked: false - isPenalized: false - mutationOperator: !!eva2.optimization.operator.mutation.MutateESGlobal {crossoverType: intermediate, - lowerLimitStepSize: 5.0E-7, mutationStepSize: 0.07472246902143609, tau1: 0.15} - mutationProbability: 1.0 - - !!eva2.optimization.individuals.ESIndividualDoubleData - areaConst4ParallelViolated: false - crossoverOperator: *id001 - crossoverProbability: 0.5 - initOperator: !!eva2.optimization.operator.initialization.DefaultInitialization {} - isMarked: false - isPenalized: false - mutationOperator: !!eva2.optimization.operator.mutation.MutateESGlobal {crossoverType: intermediate, - lowerLimitStepSize: 5.0E-7, mutationStepSize: 0.09278219055003001, tau1: 0.15} - mutationProbability: 1.0 - - !!eva2.optimization.individuals.ESIndividualDoubleData - areaConst4ParallelViolated: false - crossoverOperator: *id001 - crossoverProbability: 0.5 - initOperator: !!eva2.optimization.operator.initialization.DefaultInitialization {} - isMarked: false - isPenalized: false - mutationOperator: !!eva2.optimization.operator.mutation.MutateESGlobal {crossoverType: intermediate, - lowerLimitStepSize: 5.0E-7, mutationStepSize: 0.09941360830188067, tau1: 0.15} - mutationProbability: 1.0 - - !!eva2.optimization.individuals.ESIndividualDoubleData - areaConst4ParallelViolated: false - crossoverOperator: *id001 - crossoverProbability: 0.5 - initOperator: !!eva2.optimization.operator.initialization.DefaultInitialization {} - isMarked: false - isPenalized: false - mutationOperator: !!eva2.optimization.operator.mutation.MutateESGlobal {crossoverType: intermediate, - lowerLimitStepSize: 5.0E-7, mutationStepSize: 0.08851303873387742, tau1: 0.15} - mutationProbability: 1.0 - - !!eva2.optimization.individuals.ESIndividualDoubleData - areaConst4ParallelViolated: false - crossoverOperator: *id001 - crossoverProbability: 0.5 - initOperator: !!eva2.optimization.operator.initialization.DefaultInitialization {} - isMarked: false - isPenalized: false - mutationOperator: !!eva2.optimization.operator.mutation.MutateESGlobal {crossoverType: intermediate, - lowerLimitStepSize: 5.0E-7, mutationStepSize: 0.12157528956545222, tau1: 0.15} - mutationProbability: 1.0 -postProcessParams: !!eva2.optimization.operator.postprocess.PostProcessParams - PPMethod: nelderMead - accAssumeConv: 1.0E-8 - accMaxEval: -1 - accuracies: [0.01] - doPostProcessing: false - postProcessClusterSigma: 0.05 - postProcessSteps: 5000 - printNBest: 10 - withPlot: false -problem: !!eva2.problems.SimpleProblemWrapper - defaultAccuracy: 0.001 - defaultRange: 10.0 - individualTemplate: !!eva2.optimization.individuals.ESIndividualDoubleData - areaConst4ParallelViolated: false - crossoverOperator: *id001 - crossoverProbability: 0.5 - initOperator: !!eva2.optimization.operator.initialization.DefaultInitialization {} - isMarked: false - isPenalized: false - mutationOperator: !!eva2.optimization.operator.mutation.MutateESGlobal {crossoverType: intermediate, - lowerLimitStepSize: 5.0E-7, mutationStepSize: 0.2, tau1: 0.15} - mutationProbability: 1.0 - noise: 0.0 - parallelThreads: 1 - simpleProblem: !!eva2.problems.simple.HyperVolleyballProblem - dimension: 3 - playerSigma: 0.5 - players: - - position: [4.5, 4.5] - sigma: 1.0 - - position: [2.25, 2.25] - sigma: 1.0 - - position: [2.25, 6.75] - sigma: 1.0 - - position: [6.75, 2.25] - sigma: 1.0 - - position: [6.75, 6.75] - sigma: 1.0 -randomSeed: 0 -terminator: !!eva2.optimization.operator.terminators.EvaluationTerminator {fitnessCalls: 500} diff --git a/is/ub7/is7.pdf b/is/ub7/is7.pdf index 2d8ad27..a14b3fe 100644 --- a/is/ub7/is7.pdf +++ b/is/ub7/is7.pdf Binary files differ diff --git a/is/ub7/is7.tex b/is/ub7/is7.tex index 4a94703..16d37e1 100644 --- a/is/ub7/is7.tex +++ b/is/ub7/is7.tex @@ -105,13 +105,14 @@ % aber es ist doch gefragt wann W unabhängig von X ist $W=-4V-0.5X+0.5N_y+2\alpha X+2N_z+N_w$\\ for $\alpha =0.25$\\ - $W=-4V+0.5N_y+2N_z+N_w$ + $W=-4V+0.5N_y+2N_z+N_w$ \item \begin{align*} \frac{d}{dx}\mathds{E}\left(W|do\ X=x\right)&=-4\frac{d\mathds{E}(V|do\ X=x)}{dx}+0.5\frac{d\mathds{E}(Y|do\ X=x)}{dx}+2\frac{d\mathds{E}(Z|do\ X=x)}{dx}\\ &=0.5\cdot\left(-1\right)+2\cdot\alpha\\ &=2\alpha -0.5 \end{align*} - This is the slope of $W(x)$, which is only depending on $\alpha$. + This is the slope of $W(x)$, which is only depending on $\alpha$.\\ + \textcolor{red}{For large $\alpha$ the influence of X on W is larger} \end{enumerate} \end{document} diff --git a/is/ub8/is8.pdf b/is/ub8/is8.pdf index 672e213..b952576 100644 --- a/is/ub8/is8.pdf +++ b/is/ub8/is8.pdf Binary files differ diff --git a/is/ub8/is8.tex b/is/ub8/is8.tex index 7fb53d0..5929687 100644 --- a/is/ub8/is8.tex +++ b/is/ub8/is8.tex @@ -84,7 +84,7 @@ P(\text{large stone})&=\frac{343}{343+357}=0.49\\ P_A(R=1)&=\sum\limits_Z P(R=1|Z=z,T=A)P(Z=z)\\ &=0.73\cdot 0.49 + 0.93\cdot 0.51\approx 0.832\\ - P_B(R=1)&=\sum\limits_Z P(R=1|Z=z,T=A)P(Z=z)\\ + P_B(R=1)&=\sum\limits_Z P(R=1|Z=z,T=B)P(Z=z)\\ &=0.69\cdot 0.49 + 0.87\cdot 0.51\approx 0.782 \end{align*} (Formula from the lecture)\\ diff --git a/mr/ub10/A1a.png b/mr/ub10/A1a.png deleted file mode 100644 index 330a7df..0000000 --- a/mr/ub10/A1a.png +++ /dev/null Binary files differ diff --git a/mr/ub10/A1b.png b/mr/ub10/A1b.png deleted file mode 100644 index 56d93bf..0000000 --- a/mr/ub10/A1b.png +++ /dev/null Binary files differ diff --git a/mr/ub10/A1c/EX1.m b/mr/ub10/A1c/EX1.m deleted file mode 100644 index a9ca7be..0000000 --- a/mr/ub10/A1c/EX1.m +++ /dev/null @@ -1,66 +0,0 @@ -p=[24,10;27,1;35,1;38,4;34,9;44,8;50,19;44,25;24,25;30,18;24,10;27,1] -x=p(:,1); -y=p(:,2); - -[~,xmin]=min(x); -[~,xmax]=max(x); -xmin -xmax -%expanded red -%new added green -%poligon red - -figure(1) -scatter(x,y); -line(p([1,7],1),p([1,7],2),'Color',[1 0 0]) -line(p([1,3],1),p([1,3],2),'Color',[0 1 0]) -line(p([7,3],1),p([7,3],2),'Color',[0 1 0]) - -figure(2) -scatter(x,y); -line(p([1,7],1),p([1,7],2),'Color',[0 0 1]) -line(p([7,3],1),p([7,3],2),'Color',[0 0 1]) -line(p([1,3],1),p([1,3],2),'Color',[1 0 0]) -line(p([1,2],1),p([1,2],2),'Color',[0 1 0]) -line(p([3,2],1),p([3,2],2),'Color',[0 1 0]) - -figure(3) -scatter(x,y); -line(p([1,7],1),p([1,7],2),'Color',[0 0 1]) -line(p([7,3],1),p([7,3],2),'Color',[1 0 0]) -line(p([1,2],1),p([1,2],2),'Color',[0 0 1]) -line(p([3,2],1),p([3,2],2),'Color',[0 0 1]) -line(p([7,6],1),p([7,6],2),'Color',[0 1 0]) -line(p([3,6],1),p([3,6],2),'Color',[0 1 0]) - -figure(4) -scatter(x,y); -line(p([1,2],1),p([1,2],2),'Color',[0 0 1]) -line(p([3,2],1),p([3,2],2),'Color',[0 0 1]) -line(p([7,6],1),p([7,6],2),'Color',[0 0 1]) -line(p([3,6],1),p([3,6],2),'Color',[0 0 1]) -line(p([9,7],1),p([9,7],2),'Color',[0 1 0]) -line(p([9,1],1),p([9,1],2),'Color',[0 1 0]) - -figure(5) -scatter(x,y); -line(p([1,2],1),p([1,2],2),'Color',[0 0 1]) -line(p([3,2],1),p([3,2],2),'Color',[0 0 1]) -line(p([7,6],1),p([7,6],2),'Color',[0 0 1]) -line(p([3,6],1),p([3,6],2),'Color',[0 0 1]) -line(p([9,7],1),p([9,7],2),'Color',[1 0 0]) -line(p([9,1],1),p([9,1],2),'Color',[0 0 1]) -line(p([9,8],1),p([9,8],2),'Color',[0 1 0]) -line(p([8,7],1),p([8,7],2),'Color',[0 1 0]) - -figure(6) -scatter(x,y); -line(p([1,2],1),p([1,2],2),'Color',[0 0 1]) -line(p([3,2],1),p([3,2],2),'Color',[0 0 1]) -line(p([7,6],1),p([7,6],2),'Color',[0 0 1]) -line(p([3,6],1),p([3,6],2),'Color',[0 0 1]) -line(p([9,1],1),p([9,1],2),'Color',[0 0 1]) -line(p([9,8],1),p([9,8],2),'Color',[0 0 1]) -line(p([8,7],1),p([8,7],2),'Color',[0 0 1]) - - diff --git a/mr/ub10/A1c/step1.fig b/mr/ub10/A1c/step1.fig deleted file mode 100644 index 8cd2b16..0000000 --- a/mr/ub10/A1c/step1.fig +++ /dev/null Binary files differ diff --git a/mr/ub10/A1c/step1.png b/mr/ub10/A1c/step1.png deleted file mode 100644 index a08c90b..0000000 --- a/mr/ub10/A1c/step1.png +++ /dev/null Binary files differ diff --git a/mr/ub10/A1c/step2.fig b/mr/ub10/A1c/step2.fig deleted file mode 100644 index da19758..0000000 --- a/mr/ub10/A1c/step2.fig +++ /dev/null Binary files differ diff --git a/mr/ub10/A1c/step2.png b/mr/ub10/A1c/step2.png deleted file mode 100644 index a34e364..0000000 --- a/mr/ub10/A1c/step2.png +++ /dev/null Binary files differ diff --git a/mr/ub10/A1c/step3.fig b/mr/ub10/A1c/step3.fig deleted file mode 100644 index 4a32f82..0000000 --- a/mr/ub10/A1c/step3.fig +++ /dev/null Binary files differ diff --git a/mr/ub10/A1c/step3.png b/mr/ub10/A1c/step3.png deleted file mode 100644 index e1360b3..0000000 --- a/mr/ub10/A1c/step3.png +++ /dev/null Binary files differ diff --git a/mr/ub10/A1c/step4.fig b/mr/ub10/A1c/step4.fig deleted file mode 100644 index 42f4163..0000000 --- a/mr/ub10/A1c/step4.fig +++ /dev/null Binary files differ diff --git a/mr/ub10/A1c/step4.png b/mr/ub10/A1c/step4.png deleted file mode 100644 index 41f321c..0000000 --- a/mr/ub10/A1c/step4.png +++ /dev/null Binary files differ diff --git a/mr/ub10/A1c/step5.fig b/mr/ub10/A1c/step5.fig deleted file mode 100644 index fd65259..0000000 --- a/mr/ub10/A1c/step5.fig +++ /dev/null Binary files differ diff --git a/mr/ub10/A1c/step5.png b/mr/ub10/A1c/step5.png deleted file mode 100644 index c2c09ac..0000000 --- a/mr/ub10/A1c/step5.png +++ /dev/null Binary files differ diff --git a/mr/ub10/A1c/step6.fig b/mr/ub10/A1c/step6.fig deleted file mode 100644 index d033294..0000000 --- a/mr/ub10/A1c/step6.fig +++ /dev/null Binary files differ diff --git a/mr/ub10/A1c/step6.png b/mr/ub10/A1c/step6.png deleted file mode 100644 index 93930c0..0000000 --- a/mr/ub10/A1c/step6.png +++ /dev/null Binary files differ diff --git a/mr/ub10/A2/A2.m b/mr/ub10/A2/A2.m deleted file mode 100644 index 3f72f35..0000000 --- a/mr/ub10/A2/A2.m +++ /dev/null @@ -1,134 +0,0 @@ -start=[3,7] -start= [8,2] -goal=[8,8] - -d=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 - -1,-1,inf,inf,-1,inf,inf,inf,inf,-1 - -1,inf,inf,inf,-1,inf,inf,inf,inf,-1 - -1,inf,inf,inf,-1,-1,inf,inf,inf,-1 - -1,inf,-1,inf,inf,-1,-1,inf,-1,-1 - -1,inf,-1,inf,-1,-1,-1,inf,-1,-1 - -1,inf,-1,inf,inf,inf,inf,inf,inf,-1 - -1,inf,-1,inf,inf,inf,inf,inf,inf,-1 - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1]; -latexmat(d, '%g') -d(start(1),start(2))= 0; -d; -%make d template to show changes -dvt= d; -for e= 1:size(d,1) - for f= 1:size(d,2) - if dvt(e,f)>-1 - dvt(e,f)= NaN; - end - end -end -dvt; -d; -changed = true; -s2= sqrt(2); -step=-1; -while changed - step=step+1 - changed= false; - dv= dvt; - for y = size(d,1)-1:-1:2%forward scan - for x = 2:size(d,2)-1 - if(d(y,x) >-1) - a=[d(y,x)]; - if(d(y,x-1) >-1) - a=[a d(y,x-1)+1]; - end - if(d(y,x+1) >-1) - a=[a d(y,x+1)+s2]; - end - if(d(y+1,x)>-1) - a=[a d(y+1,x)+1]; - end - if d(y+1,x-1) >-1 - a=[a d(y+1,x-1)+s2]; - end - - mi = min(a); - if(mi~=d(y,x)); - changed = true; - end - if(d(y,x)~=mi) - dv(y,x)=mi; - end - d(y,x) = mi; - - - end - end - end - forward=0 - d; - dv; - latexmat(dv, '%g') - dv=dvt; - for y = 2:size(d,1)-1%backward scan - for x = size(d,2)-1:-1:2 - if(d(y,x) >-1) - a=[d(y,x)]; - if(d(y,x+1) >-1) - a=[a d(y,x+1)+1]; - end - if(d(y-1,x-1) >-1) - a=[a d(y-1,x-1)+s2]; - end - if(d(y-1,x)>-1) - a=[a d(y-1,x)+1]; - end - if d(y-1,x+1) >-1 - a=[a d(y-1,x+1)+s2]; - end - mi = min(a); - if(mi~=d(y,x)) - changed = true; - end - if(d(y,x)~=mi) - dv(y,x)=mi; - end - d(y,x) = mi; - - end - end - end - backward=0 - step - d; - dv; - latexmat(dv, '%g') -end -%plot gradient -colormap(gray) -imagesc(d) - -%get gradient path. -cp= goal; -path =goal; - - -while ~isequal(cp,start) - neighbours=[]; - for x = [cp(1)-1:cp(1)+1] - for y=[cp(2)-1:cp(2)+1] - if ~isequal([x,y],cp) && (d(x,y)>-1) - neighbours = cat(1,neighbours,[x,y]); - end - end - end - nv=[]; - for i = 1:size(neighbours,1) - yy=neighbours(i,:); - nv = [nv d(yy(1),yy(2))]; - end - [m,minindex] = min(nv); - m; - cp= neighbours(minindex,:); - path = cat(1,cp,path); -end -path -latexmat(path, '%g') - diff --git a/mr/ub10/A2/gradientA.png b/mr/ub10/A2/gradientA.png deleted file mode 100644 index 830331a..0000000 --- a/mr/ub10/A2/gradientA.png +++ /dev/null Binary files differ diff --git a/mr/ub10/A2/gradientAb.png b/mr/ub10/A2/gradientAb.png deleted file mode 100644 index 369b082..0000000 --- a/mr/ub10/A2/gradientAb.png +++ /dev/null Binary files differ diff --git a/mr/ub10/A2/gradientB.png b/mr/ub10/A2/gradientB.png deleted file mode 100644 index c809b19..0000000 --- a/mr/ub10/A2/gradientB.png +++ /dev/null Binary files differ diff --git a/mr/ub10/A2/gradientBb.png b/mr/ub10/A2/gradientBb.png deleted file mode 100644 index 6f88db2..0000000 --- a/mr/ub10/A2/gradientBb.png +++ /dev/null Binary files differ diff --git a/mr/ub10/A2/latexmat.m b/mr/ub10/A2/latexmat.m deleted file mode 100644 index ee02256..0000000 --- a/mr/ub10/A2/latexmat.m +++ /dev/null @@ -1,52 +0,0 @@ -function str = latexmat(mat, format) -%LATEXMAT Generate LaTeX code for a matrix. -% -% STR = LATEXMAT(MAT, FORMAT) return the LaTeX code for the matrix MAT, with -% the given FORMAT. -% -% See HELP SPRINTF for more details about the FORMAT parameter. - -% Author: Peter John Acklam -% Time-stamp: 2003-07-12 22:14:14 +0200 -% E-mail: pjacklam@online.no -% URL: http://home.online.no/~pjacklam - - error(nargchk(2, 2, nargin)); - - if ischar(mat) - error('First argument can not be a string.'); - end - - if ~ischar(format) - error('Second argument must be a string.'); - end - - [ r, c ] = size(mat); - - newline = sprintf('\n'); - - str = [ '\left[ \begin{array}{' ... - char(abs('c')*ones(1,c)) '}' newline ]; - - for i = 1:r - str = [ str ' ' ]; - for j = 1:c - t = sprintf(format, real(mat(i,j))); - if (imag(mat(i,j)) > 0) - t = [ t '+' sprintf(format, imag(mat(i,j))) 'i' ]; - elseif (imag(mat(i,j)) < 0) - t = [ t '-' sprintf(format, -imag(mat(i,j))) 'i' ]; - end - str = [ str ' ' t ]; - if j < c - str = [ str ' &' ]; - else - if i < r - str = [ str ' \\' newline ]; - else - str = [ str newline ]; - end - end - end - end - str = [ str '\end{array} \right]' newline ]; diff --git a/mr/ub10/assignment10.pdf b/mr/ub10/assignment10.pdf deleted file mode 100644 index e76391a..0000000 --- a/mr/ub10/assignment10.pdf +++ /dev/null Binary files differ diff --git a/mr/ub10/assignment10_presets.pdf b/mr/ub10/assignment10_presets.pdf deleted file mode 100644 index 46c7208..0000000 --- a/mr/ub10/assignment10_presets.pdf +++ /dev/null Binary files differ diff --git a/mr/ub10/assignment10_presets.tex b/mr/ub10/assignment10_presets.tex deleted file mode 100644 index 05849ba..0000000 --- a/mr/ub10/assignment10_presets.tex +++ /dev/null @@ -1,176 +0,0 @@ -\documentclass[a4paper,12pt]{article} - -\usepackage[english]{babel} % fuer deutsche Einstellungen -% \usepackage[german]{babel} -% \usepackage[T1]{fontenc} -\usepackage[utf8]{inputenc} % fuer Umlaute -\usepackage{amssymb} -\usepackage{amsfonts} -\usepackage{epsfig} % fuer Abbildungen -%\usepackage{german} -\usepackage{url} -\usepackage{mathcomp} -% -\usepackage{amssymb} -\usepackage{amsmath} -\usepackage{amsthm} -\usepackage[autolanguage]{numprint} -\usepackage{siunitx} - -\usepackage{tikz} -\usepackage{tikz,fullpage} -\usetikzlibrary{arrows,shapes} -\usepackage{float} - -\usepackage{hyperref} -\usepackage{enumerate} -\usepackage{multicol} - -\clubpenalty = 10000 -\widowpenalty = 10000 \displaywidowpenalty = 10000 - -\relpenalty=9999 -\binoppenalty=9999 - -\newcommand*{\xMax}{24}% -\newcommand*{\yMax}{24}% - -\begin{document} - -\newcommand{\presetDta}{ -\begin{tikzpicture}[scale=0.8]\draw[step=1.0cm,color=gray] (0,0) grid (9, 9); - -\draw [fill=black!50] (0, 8)rectangle (1, 9);\node at (0.5, 8.5) {};\draw [fill=black!50] (1, 8)rectangle (2, 9);\node at (1.5, 8.5) {};\draw [fill=black!50] (2, 8)rectangle (3, 9);\node at (2.5, 8.5) {};\draw [fill=black!50] (3, 8)rectangle (4, 9);\node at (3.5, 8.5) {};\draw [fill=black!50] (4, 8)rectangle (5, 9);\node at (4.5, 8.5) {};\draw [fill=black!50] (5, 8)rectangle (6, 9);\node at (5.5, 8.5) {};\draw [fill=black!50] (6, 8)rectangle (7, 9);\node at (6.5, 8.5) {};\draw [fill=black!50] (7, 8)rectangle (8, 9);\node at (7.5, 8.5) {};\draw [fill=black!50] (8, 8)rectangle (9, 9);\node at (8.5, 8.5) {};\draw [fill=black!50] (9, 8)rectangle (10, 9); - -\draw [fill=black!50] (0, 7)rectangle (1, 8);\node at (0.5, 7.5) {};\draw [fill=black!50] (1, 7)rectangle (2, 8);\node at (1.5, 7.5) {};\draw [fill=white] (2, 7)rectangle (3, 8);\node at (2.5, 7.5) {};\draw [fill=white] (3, 7)rectangle (4, 8);\node at (3.5, 7.5) {};\draw [fill=black!50] (4, 7)rectangle (5, 8);\node at (4.5, 7.5) {};\draw [fill=white] (5, 7)rectangle (6, 8);\node at (5.5, 7.5) {};\draw [fill=white] (6, 7)rectangle (7, 8);\node at (6.5, 7.5) {};\draw [fill=white] (7, 7)rectangle (8, 8);\node at (7.5, 7.5) {};\draw [fill=white] (8, 7)rectangle (9, 8);\node at (8.5, 7.5) {};\draw [fill=black!50] (9, 7)rectangle (10, 8); - -\draw [fill=black!50] (0, 6)rectangle (1, 7);\node at (0.5, 6.5) {};\draw [fill=white] (1, 6)rectangle (2, 7);\node at (1.5, 6.5) {};\draw [fill=white] (2, 6)rectangle (3, 7);\node at (2.5, 6.5) {};\draw [fill=white] (3, 6)rectangle (4, 7);\node at (3.5, 6.5) {};\draw [fill=black!50] (4, 6)rectangle (5, 7);\node at (4.5, 6.5) {};\draw [fill=white] (5, 6)rectangle (6, 7);\node at (5.5, 6.5) {};\draw [fill=yellow] (6, 6)rectangle (7, 7);\node at (6.5, 6.5) {$B$};\draw [fill=white] (7, 6)rectangle (8, 7);\node at (7.5, 6.5) {};\draw [fill=white] (8, 6)rectangle (9, 7);\node at (8.5, 6.5) {};\draw [fill=black!50] (9, 6)rectangle (10, 7); - -\draw [fill=black!50] (0, 5)rectangle (1, 6);\node at (0.5, 5.5) {};\draw [fill=white] (1, 5)rectangle (2, 6);\node at (1.5, 5.5) {};\draw [fill=white] (2, 5)rectangle (3, 6);\node at (2.5, 5.5) {};\draw [fill=white] (3, 5)rectangle (4, 6);\node at (3.5, 5.5) {};\draw [fill=black!50] (4, 5)rectangle (5, 6);\node at (4.5, 5.5) {};\draw [fill=black!50] (5, 5)rectangle (6, 6);\node at (5.5, 5.5) {};\draw [fill=white] (6, 5)rectangle (7, 6);\node at (6.5, 5.5) {};\draw [fill=white] (7, 5)rectangle (8, 6);\node at (7.5, 5.5) {};\draw [fill=white] (8, 5)rectangle (9, 6);\node at (8.5, 5.5) {};\draw [fill=black!50] (9, 5)rectangle (10, 6); - -\draw [fill=black!50] (0, 4)rectangle (1, 5);\node at (0.5, 4.5) {};\draw [fill=white] (1, 4)rectangle (2, 5);\node at (1.5, 4.5) {};\draw [fill=black!50] (2, 4)rectangle (3, 5);\node at (2.5, 4.5) {};\draw [fill=white] (3, 4)rectangle (4, 5);\node at (3.5, 4.5) {};\draw [fill=white] (4, 4)rectangle (5, 5);\node at (4.5, 4.5) {};\draw [fill=black!50] (5, 4)rectangle (6, 5);\node at (5.5, 4.5) {};\draw [fill=black!50] (6, 4)rectangle (7, 5);\node at (6.5, 4.5) {};\draw [fill=white] (7, 4)rectangle (8, 5);\node at (7.5, 4.5) {};\draw [fill=black!50] (8, 4)rectangle (9, 5);\node at (8.5, 4.5) {};\draw [fill=black!50] (9, 4)rectangle (10, 5); - -\draw [fill=black!50] (0, 3)rectangle (1, 4);\node at (0.5, 3.5) {};\draw [fill=white] (1, 3)rectangle (2, 4);\node at (1.5, 3.5) {};\draw [fill=black!50] (2, 3)rectangle (3, 4);\node at (2.5, 3.5) {};\draw [fill=white] (3, 3)rectangle (4, 4);\node at (3.5, 3.5) {};\draw [fill=black!50] (4, 3)rectangle (5, 4);\node at (4.5, 3.5) {};\draw [fill=black!50] (5, 3)rectangle (6, 4);\node at (5.5, 3.5) {};\draw [fill=black!50] (6, 3)rectangle (7, 4);\node at (6.5, 3.5) {};\draw [fill=white] (7, 3)rectangle (8, 4);\node at (7.5, 3.5) {};\draw [fill=black!50] (8, 3)rectangle (9, 4);\node at (8.5, 3.5) {};\draw [fill=black!50] (9, 3)rectangle (10, 4); - -\draw [fill=black!50] (0, 2)rectangle (1, 3);\node at (0.5, 2.5) {};\draw [fill=white] (1, 2)rectangle (2, 3);\node at (1.5, 2.5) {};\draw [fill=black!50] (2, 2)rectangle (3, 3);\node at (2.5, 2.5) {};\draw [fill=white] (3, 2)rectangle (4, 3);\node at (3.5, 2.5) {};\draw [fill=white] (4, 2)rectangle (5, 3);\node at (4.5, 2.5) {};\draw [fill=white] (5, 2)rectangle (6, 3);\node at (5.5, 2.5) {};\draw [fill=white] (6, 2)rectangle (7, 3);\node at (6.5, 2.5) {};\draw [fill=white] (7, 2)rectangle (8, 3);\node at (7.5, 2.5) {};\draw [fill=white] (8, 2)rectangle (9, 3);\node at (8.5, 2.5) {};\draw [fill=black!50] (9, 2)rectangle (10, 3); - -\draw [fill=black!50] (0, 1)rectangle (1, 2);\node at (0.5, 1.5) {};\draw [fill=yellow] (1, 1)rectangle (2, 2);\node at (1.5, 1.5) {$A$};\draw [fill=black!50] (2, 1)rectangle (3, 2);\node at (2.5, 1.5) {};\draw [fill=white] (3, 1)rectangle (4, 2);\node at (3.5, 1.5) {};\draw [fill=white] (4, 1)rectangle (5, 2);\node at (4.5, 1.5) {};\draw [fill=white] (5, 1)rectangle (6, 2);\node at (5.5, 1.5) {};\draw [fill=white] (6, 1)rectangle (7, 2);\node at (6.5, 1.5) {};\draw [fill=yellow] (7, 1)rectangle (8, 2);\node at (7.5, 1.5) {$G$};\draw [fill=white] (8, 1)rectangle (9, 2);\node at (8.5, 1.5) {};\draw [fill=black!50] (9, 1)rectangle (10, 2); - -\draw [fill=black!50] (0, 0)rectangle (1, 1);\node at (0.5, 0.5) {};\draw [fill=black!50] (1, 0)rectangle (2, 1);\node at (1.5, 0.5) {};\draw [fill=black!50] (2, 0)rectangle (3, 1);\node at (2.5, 0.5) {};\draw [fill=black!50] (3, 0)rectangle (4, 1);\node at (3.5, 0.5) {};\draw [fill=black!50] (4, 0)rectangle (5, 1);\node at (4.5, 0.5) {};\draw [fill=black!50] (5, 0)rectangle (6, 1);\node at (5.5, 0.5) {};\draw [fill=black!50] (6, 0)rectangle (7, 1);\node at (6.5, 0.5) {};\draw [fill=black!50] (7, 0)rectangle (8, 1);\node at (7.5, 0.5) {};\draw [fill=black!50] (8, 0)rectangle (9, 1);\node at (8.5, 0.5) {};\draw [fill=black!50] (9, 0)rectangle (10, 1); -\end{tikzpicture} - -\vspace{0.25cm} -} - -\newcommand{\presetOone}{ -\renewcommand*{\xMax}{23}% -\renewcommand*{\yMax}{23}% -\begin{tikzpicture}[scale=0.3, axis/.style={very thick, ->, >=stealth'}] - % grid - \draw[very thin, gray!50] (0,0) grid (\xMax, \yMax); - - % axis - \draw[axis] - (0,0) -> coordinate (x axis mid) (\xMax,0); - \draw[axis] - (0,0) -> coordinate (y axis mid) (0,\yMax); - - % labels - \foreach \i in {0,5,...,\xMax} { - \draw [very thick] (\i cm,5pt) -- (\i cm,-5pt) node [below] at (\i,0) {\i}; - } - \foreach \i in {0,5,...,\yMax} { - \draw [very thick] (5pt,\i cm) -- (-5pt,\i cm) node [left] at (0,\i) {\i}; - } - - % O1 - \draw[thick] (4, 3) -- (7, 12) -- (20, 9) -- (15, 19) -- (2, 20) -- cycle; -\end{tikzpicture} -} - - -\newcommand{\presetOtwo}{ -\renewcommand*{\xMax}{51}% -\renewcommand*{\yMax}{26}% -\begin{tikzpicture}[scale=0.25, axis/.style={very thick, ->, >=stealth'}] - % grid - \draw[very thin, gray!50] (21,0) grid (\xMax, \yMax); - - % labels - \foreach \i in {25,30,...,\xMax} { - \draw [very thick] (\i cm,-0.25) -- (\i cm,0.25) node [below] at (\i,0) {\i}; - } - \foreach \i in {5,10,...,\yMax} { - \draw [very thick] (20.75,\i cm) -- (21.25,\i cm) node [left] at (21,\i) {\i}; - } - - % O2 - \draw[thick] (27, 1) -- - (35, 1) -- - (38, 4) -- - (34, 9) -- - (44, 8) -- - (50, 19) -- - (44, 25) -- - (24, 25) -- - (30, 18) -- - (24, 10) -- cycle; - - -\end{tikzpicture} -\vspace{0.25cm} -} -\begin{multicols}{2} - -\presetDta - -\presetDta - -\presetDta - -\presetDta - -\presetDta - -\presetDta - -\end{multicols} - -\clearpage - -\begin{multicols}{2} - -\presetOone - -\presetOone - -\presetOone - -\presetOone - -\presetOone - -\presetOone - -\end{multicols} - - -\clearpage - -\begin{multicols}{2} - -\presetOtwo - -\presetOtwo - -\presetOtwo - -\presetOtwo - -\presetOtwo - -\presetOtwo - -\end{multicols} - -\end{document} diff --git a/mr/ub10/mr10.pdf b/mr/ub10/mr10.pdf deleted file mode 100644 index 958e67d..0000000 --- a/mr/ub10/mr10.pdf +++ /dev/null Binary files differ diff --git a/mr/ub10/mr10.tex b/mr/ub10/mr10.tex deleted file mode 100644 index 76cc542..0000000 --- a/mr/ub10/mr10.tex +++ /dev/null @@ -1,318 +0,0 @@ -\documentclass[a4paper,12pt]{scrartcl} -\usepackage[ngerman]{babel} -\usepackage{graphicx} %BIlder einbinden -\usepackage{amsmath} %erweiterte Mathe-Zeichen -\usepackage{amsfonts} %weitere fonts -\usepackage[utf8]{inputenc} %Umlaute & Co -\usepackage{hyperref} %Links -\usepackage{ifthen} %ifthenelse -\usepackage{enumerate} -\usepackage{pdfpages} -\usepackage{algpseudocode} %Pseudocode -\usepackage{dsfont} % schöne Zahlenräumezeichen -\usepackage{amssymb, amsthm} %noch stärker erweiterte Mathe-Zeichen -\usepackage{tikz} %TikZ ist kein Zeichenprogramm -\usetikzlibrary{trees,automata,arrows,shapes} -\usepackage{qtree} -\usepackage{listings} -\lstset{language=Matlab} - -\pagestyle{empty} - - -\topmargin-50pt - -\newcounter{aufgabe} -\def\tand{&} - -\newcommand{\makeTableLine}[2][0]{% - \setcounter{aufgabe}{1}% - \whiledo{\value{aufgabe} < #1}% - {% - #2\tand\stepcounter{aufgabe}% - } -} - -\newcommand{\aufgTable}[1]{ - \def\spalten{\numexpr #1 + 1 \relax} - \begin{tabular}{|*{\spalten}{p{1cm}|}} - \makeTableLine[\spalten]{A\theaufgabe}$\Sigma$~~\\ \hline - \rule{0pt}{15pt}\makeTableLine[\spalten]{}\\ - \end{tabular} -} - -\def\header#1#2#3#4#5#6#7{\pagestyle{empty} -\begin{minipage}[t]{0.47\textwidth} -\begin{flushleft} -{\bf #4}\\ -#5 -\end{flushleft} -\end{minipage} -\begin{minipage}[t]{0.5\textwidth} -\begin{flushright} -#6 \vspace{0.5cm}\\ -% Number of Columns Definition of Columns second empty line -% \begin{tabular}{|*{5}{C{1cm}|}}\hline A1&A2&A3&A4&$\Sigma$\\\hline&&&&\\\hline\end{tabular}\\\vspace*{0.1cm} -\aufgTable{#7} -\end{flushright} -\end{minipage} -\vspace{1cm} -\begin{center} -{\Large\bf Assignment #1} - -{(Hand-in date #3)} -\end{center} -} - - - -%counts the exercisenumber -\newcounter{n} - -%Kommando für Aufgaben -%\Aufgabe{AufgTitel}{Punktezahl} -\newcommand{\Aufgabe}[2]{\stepcounter{n} -\textbf{Exercise \arabic{n}: #1} (#2 Punkte)\\} - -\newcommand{\Normal}[3]{\mathcal{N}\left(#1,#2,#3\right)} -\newcommand{\Normalf}[3]{\frac{\left|#3\right|^{-\frac{1}{2}}}{\sqrt{2\pi}}e^{-\frac{\left(#1 - #2 \right)^2\cdot \left(#3\right)^{-1}}{2}}} - - - - -\begin{document} - %\header{BlattNr}{Tutor}{Abgabedatum}{Vorlesungsname}{Namen}{Semester}{Anzahl Aufgaben} - \header{10}{}{2015-07-07}{Mobile Robots}{ - \textit{Jan-Peter Hohloch}\\ \textit{Maximus Mutschler} - }{SS 15}{2} - \vspace{1cm} - - \Aufgabe{Convex Hull Algorithms}{10} - \begin{enumerate}[(a)] -\item \includegraphics[width=0.7\linewidth]{A1a} - \item \includegraphics[width=0.7\linewidth]{A1b} - ~\\$ \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|} - 1&2&3&4&5&6&7&8&9&10\\ - \hline - 2&3&4&5&6&7&8&9&10&9\\ - 1&2&2&4&4&6&7&8&9&8\\ - & 1&1&2&2&4&6&7&8&7\\ - && &1&1&2&4&6&7&6\\ - &&&& &1&2&4&6&4\\ - &&&&&& 1&2&4&2\\ - &&&&&&& 1&2&1\\ - &&&&&&&& 1&\\ - &&&&&&&&&\\ - \end{tabular}$\\ - S pushes the new point if it is on the left of the line through the two highest elements of the stack.\\ - S pops elements until the new point is on the right of the resultin line. - \item \pagebreak~ -\includegraphics[width=0.48\textwidth]{A1c/step1} -\includegraphics[width=0.48\textwidth]{A1c/step2} -\includegraphics[width=0.48\textwidth]{A1c/step3} -\includegraphics[width=0.48\textwidth]{A1c/step4} -\includegraphics[width=0.48\textwidth]{A1c/step5} -\includegraphics[width=0.48\textwidth]{A1c/step6} - - - \item Sklansky's algorithm runs in linear time, i.e. $\mathcal{O}(n)$ - \item QuickHull has a worst case runningtime of $\mathcal{O}(n^2)$, when there are no points that can be ignored. A geometric example of the worst case is a cylindric obstacle because a circle doesn't allow any point to be ignored because the drawn line is always nearer to the circles center then a point on the circle. - \end{enumerate} - \pagebreak - \Aufgabe{Path Planning by dynamic programming}{10} - \begin{enumerate}[(a)] - \item $\left[ \begin{array}{cccccccccc} - -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 \\ - -1 & -1 & Inf & Inf & -1 & Inf & Inf & Inf & Inf & -1 \\ - -1 & Inf & Inf & Inf & -1 & Inf & Inf & Inf & Inf & -1 \\ - -1 & Inf & Inf & Inf & -1 & -1 & Inf & Inf & Inf & -1 \\ - -1 & Inf & -1 & Inf & Inf & -1 & -1 & Inf & -1 & -1 \\ - -1 & Inf & -1 & Inf & -1 & -1 & -1 & Inf & -1 & -1 \\ - -1 & Inf & -1 & Inf & Inf & Inf & Inf & Inf & Inf & -1 \\ - -1 & Inf & -1 & Inf & Inf & Inf & Inf & Inf & Inf & -1 \\ - -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 - \end{array} \right]$ - - \item Point A:\\ - forward1:\\ - $\left[ \begin{array}{cccccccccc} - -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 \\ - -1 & -1 & 6.41421 & 6.82843 & -1 & - & - & - & - & -1 \\ - -1 & 5 & 5.41421 & 5.82843 & occ & - & - & - & - & occ \\ - occ & 4 & 4.41421 & 5.41421 & occ & occ & - & - & - & occ \\ - occ & 3 & occ & - & - & occ & occ & - & occ & occ \\ - occ & 2 & occ & - & occ & occ & occ & - & occ & occ \\ - occ & 1 & occ & - & - & - & - & - & - & occ \\ - occ & - & occ & - & - & - & - & - & - & occ \\ - occ & occ & occ & occ & occ & occ & occ & occ & occ & occ - \end{array} \right]$\\ - backward1:\\ - $\left[ \begin{array}{cccccccccc} - occ & occ & occ & occ & occ & occ & occ & occ & occ & occ \\ - occ & occ & - & - & occ & - & - & - & - & occ \\ - occ & - & - & - & occ & - & - & - & - & occ \\ - occ & - & - & - & occ & occ & - & - & - & occ \\ - occ & - & occ & 5.82843 & 6.82843 & occ & occ & - & occ & occ \\ - occ & - & occ & 6.82843 & occ & occ & occ & - & occ & occ \\ - occ & - & occ & 7.82843 & 8.24264 & - & - & - & - & occ \\ - occ & - & occ & 8.82843 & 9.24264 & 9.65685 & - & - & - & occ \\ - occ & occ & occ & occ & occ & occ & occ & occ & occ & occ - \end{array} \right]$\\ - forward2:\\ - $\left[ \begin{array}{cccccccccc} - occ & occ & occ & occ & occ & occ & occ & occ & occ & occ \\ - occ & occ & - & - & occ & - & - & 15.6569 & 16.0711 & occ \\ - occ & - & - & - & occ & - & - & 14.6569 & 15.0711 & occ \\ - occ & - & - & - & occ & occ & - & 13.6569 & 14.0711 & occ \\ - occ & - & occ & - & - & occ & occ & 12.6569 & occ & occ \\ - occ & - & occ & - & occ & occ & occ & 11.6569 & occ & occ \\ - occ & - & occ & - & - & 9.24264 & 10.2426 & 11.2426 & 12.2426 & occ \\ - occ & - & occ & - & - & - & 10.6569 & 11.6569 & 12.6569 & occ \\ - occ & occ & occ & occ & occ & occ & occ & occ & occ & occ - \end{array} \right]$\\ - backward2:\\ - $\left[ \begin{array}{cccccccccc} - occ & occ & occ & occ & occ & occ & occ & occ & occ & occ \\ - occ & occ & - & - & occ & 17.6569 & 16.6569 & - & - & occ \\ - occ & - & - & - & occ & 16.6569 & 15.6569 & - & - & occ \\ - occ & - & - & - & occ & occ & 14.6569 & - & - & occ \\ - occ & - & occ & - & - & occ & occ & - & occ & occ \\ - occ & - & occ & - & occ & occ & occ & - & occ & occ \\ - occ & - & occ & - & - & - & - & - & - & occ \\ - occ & - & occ & - & - & - & - & - & - & occ \\ - occ & occ & occ & occ & occ & occ & occ & occ & occ & occ - \end{array} \right]$\\ - forward3\\ - $\left[ \begin{array}{cccccccccc} - occ & occ & occ & occ & occ & occ & occ & occ & occ & occ \\ - occ & occ & - & - & occ & - & - & - & - & occ \\ - occ & - & - & - & occ & - & - & - & - & occ \\ - occ & - & - & - & occ & occ & - & - & - & occ \\ - occ & - & occ & - & - & occ & occ & - & occ & occ \\ - occ & - & occ & - & occ & occ & occ & - & occ & occ \\ - occ & - & occ & - & - & - & - & - & - & occ \\ - occ & - & occ & - & - & - & - & - & - & occ \\ - occ & occ & occ & occ & occ & occ & occ & occ & occ & occ - \end{array} \right]$\\ - backward3\\ - $\left[ \begin{array}{cccccccccc} - occ & occ & occ & occ & occ & occ & occ & occ & occ & occ \\ - occ & occ & - & - & occ & - & - & - & - & occ \\ - occ & - & - & - & occ & - & - & - & - & occ \\ - occ & - & - & - & occ & occ & - & - & - & occ \\ - occ & - & occ & - & - & occ & occ & - & occ & occ \\ - occ & - & occ & - & occ & occ & occ & - & occ & occ \\ - occ & - & occ & - & - & - & - & - & - & occ \\ - occ & - & occ & - & - & - & - & - & - & occ \\ - occ & occ & occ & occ & occ & occ & occ & occ & occ & occ - \end{array} \right]$ - \\ - Point B:\\ - forward1:\\ - $\left[ \begin{array}{cccccccccc} - occ & occ & occ & occ & occ & occ & occ & occ & occ & occ \\ - occ & occ & - & - & occ & 2.41421 & 1 & 1.41421 & 2.41421 & occ \\ - occ & - & - & - & occ & 1.41421 & - & 1 & 2 & occ \\ - occ & - & - & - & occ & occ & - & - & - & occ \\ - occ & - & occ & - & - & occ & occ & - & occ & occ \\ - occ & - & occ & - & occ & occ & occ & - & occ & occ \\ - occ & - & occ & - & - & - & - & - & - & occ \\ - occ & - & occ & - & - & - & - & - & - & occ \\ - occ & occ & occ & occ & occ & occ & occ & occ & occ & occ - \end{array} \right]$\\ - backward1:\\ - $\left[ \begin{array}{cccccccccc} - occ & occ & occ & occ & occ & occ & occ & occ & occ & occ \\ - occ & occ & - & - & occ & 2 & - & - & - & occ \\ - occ & - & - & - & occ & 1 & - & - & - & occ \\ - occ & - & - & - & occ & occ & 1 & 1.41421 & 2.41421 & occ \\ - occ & - & occ & - & - & occ & occ & 2.41421 & occ & occ \\ - occ & - & occ & - & occ & occ & occ & 3.41421 & occ & occ \\ - occ & - & occ & 7.82843 & 6.82843 & 5.82843 & 4.82843 & 4.41421 & 4.82843 & occ \\ - occ & - & occ & 8.24264 & 7.24264 & 6.24264 & 5.82843 & 5.41421 & 5.82843 & occ \\ - occ & occ & occ & occ & occ & occ & occ & occ & occ & occ - \end{array} \right]$\\ - forward2:\\ - $\left[ \begin{array}{cccccccccc} - occ & occ & occ & occ & occ & occ & occ & occ & occ & occ \\ - occ & occ & - & 12.8284 & occ & - & - & - & - & occ \\ - occ & - & - & 11.8284 & occ & - & - & - & - & occ \\ - occ & - & - & 10.8284 & occ & occ & - & - & - & occ \\ - occ & - & occ & 9.82843 & 10.2426 & occ & occ & - & occ & occ \\ - occ & - & occ & 8.82843 & occ & occ & occ & - & occ & occ \\ - occ & - & occ & - & - & - & - & - & - & occ \\ - occ & - & occ & - & - & - & - & - & - & occ \\ - occ & occ & occ & occ & occ & occ & occ & occ & occ & occ - \end{array} \right]$\\ - backward2:\\ - $\left[ \begin{array}{cccccccccc} - occ & occ & occ & occ & occ & occ & occ & occ & occ & occ \\ - occ & occ & 13.8284 & - & occ & - & - & - & - & occ \\ - occ & 13.8284 & 12.8284 & - & occ & - & - & - & - & occ \\ - occ & 12.8284 & 11.8284 & - & occ & occ & - & - & - & occ \\ - occ & 13.2426 & occ & - & - & occ & occ & - & occ & occ \\ - occ & 14.2426 & occ & - & occ & occ & occ & - & occ & occ \\ - occ & 15.2426 & occ & - & - & - & - & - & - & occ \\ - occ & 16.2426 & occ & - & - & - & - & - & - & occ \\ - occ & occ & occ & occ & occ & occ & occ & occ & occ & occ - \end{array} \right]$\\ - - forward3\\ - $\left[ \begin{array}{cccccccccc} - occ & occ & occ & occ & occ & occ & occ & occ & occ & occ \\ - occ & occ & - & - & occ & - & - & - & - & occ \\ - occ & - & - & - & occ & - & - & - & - & occ \\ - occ & - & - & - & occ & occ & - & - & - & occ \\ - occ & - & occ & - & - & occ & occ & - & occ & occ \\ - occ & - & occ & - & occ & occ & occ & - & occ & occ \\ - occ & - & occ & - & - & - & - & - & - & occ \\ - occ & - & occ & - & - & - & - & - & - & occ \\ - occ & occ & occ & occ & occ & occ & occ & occ & occ & occ - \end{array} \right]$\\ - backward3\\ - $\left[ \begin{array}{cccccccccc} - occ & occ & occ & occ & occ & occ & occ & occ & occ & occ \\ - occ & occ & - & - & occ & - & - & - & - & occ \\ - occ & - & - & - & occ & - & - & - & - & occ \\ - occ & - & - & - & occ & occ & - & - & - & occ \\ - occ & - & occ & - & - & occ & occ & - & occ & occ \\ - occ & - & occ & - & occ & occ & occ & - & occ & occ \\ - occ & - & occ & - & - & - & - & - & - & occ \\ - occ & - & occ & - & - & - & - & - & - & occ \\ - occ & occ & occ & occ & occ & occ & occ & occ & occ & occ - \end{array} \right]$ - -\pagebreak - \item ~ -Point A:\\ -\includegraphics[width=0.7\linewidth]{A2/gradientAb}\\ -Point B:\\ -\includegraphics[width=0.7\linewidth]{A2/gradientBb} -\pagebreak -\item path a:\\ -$\left[ \begin{array}{cc} -8 & 2 \\ -7 & 2 \\ -6 & 2 \\ -5 & 2 \\ -4 & 3 \\ -5 & 4 \\ -6 & 4 \\ -7 & 5 \\ -7 & 6 \\ -7 & 7 \\ -8 & 8 -\end{array} \right]$\\ -path b:\\ -$\left[ \begin{array}{cc} - 3 & 7 \\ - 4 & 7 \\ - 5 & 8 \\ - 6 & 8 \\ - 7 & 8 \\ - 8 & 8 -\end{array} \right]$ - -\end{enumerate} -\end{document} - diff --git a/mr/ubA/A1a.png b/mr/ubA/A1a.png new file mode 100644 index 0000000..330a7df --- /dev/null +++ b/mr/ubA/A1a.png Binary files differ diff --git a/mr/ubA/A1b.png b/mr/ubA/A1b.png new file mode 100644 index 0000000..56d93bf --- /dev/null +++ b/mr/ubA/A1b.png Binary files differ diff --git a/mr/ubA/A1c/EX1.m b/mr/ubA/A1c/EX1.m new file mode 100644 index 0000000..a9ca7be --- /dev/null +++ b/mr/ubA/A1c/EX1.m @@ -0,0 +1,66 @@ +p=[24,10;27,1;35,1;38,4;34,9;44,8;50,19;44,25;24,25;30,18;24,10;27,1] +x=p(:,1); +y=p(:,2); + +[~,xmin]=min(x); +[~,xmax]=max(x); +xmin +xmax +%expanded red +%new added green +%poligon red + +figure(1) +scatter(x,y); +line(p([1,7],1),p([1,7],2),'Color',[1 0 0]) +line(p([1,3],1),p([1,3],2),'Color',[0 1 0]) +line(p([7,3],1),p([7,3],2),'Color',[0 1 0]) + +figure(2) +scatter(x,y); +line(p([1,7],1),p([1,7],2),'Color',[0 0 1]) +line(p([7,3],1),p([7,3],2),'Color',[0 0 1]) +line(p([1,3],1),p([1,3],2),'Color',[1 0 0]) +line(p([1,2],1),p([1,2],2),'Color',[0 1 0]) +line(p([3,2],1),p([3,2],2),'Color',[0 1 0]) + +figure(3) +scatter(x,y); +line(p([1,7],1),p([1,7],2),'Color',[0 0 1]) +line(p([7,3],1),p([7,3],2),'Color',[1 0 0]) +line(p([1,2],1),p([1,2],2),'Color',[0 0 1]) +line(p([3,2],1),p([3,2],2),'Color',[0 0 1]) +line(p([7,6],1),p([7,6],2),'Color',[0 1 0]) +line(p([3,6],1),p([3,6],2),'Color',[0 1 0]) + +figure(4) +scatter(x,y); +line(p([1,2],1),p([1,2],2),'Color',[0 0 1]) +line(p([3,2],1),p([3,2],2),'Color',[0 0 1]) +line(p([7,6],1),p([7,6],2),'Color',[0 0 1]) +line(p([3,6],1),p([3,6],2),'Color',[0 0 1]) +line(p([9,7],1),p([9,7],2),'Color',[0 1 0]) +line(p([9,1],1),p([9,1],2),'Color',[0 1 0]) + +figure(5) +scatter(x,y); +line(p([1,2],1),p([1,2],2),'Color',[0 0 1]) +line(p([3,2],1),p([3,2],2),'Color',[0 0 1]) +line(p([7,6],1),p([7,6],2),'Color',[0 0 1]) +line(p([3,6],1),p([3,6],2),'Color',[0 0 1]) +line(p([9,7],1),p([9,7],2),'Color',[1 0 0]) +line(p([9,1],1),p([9,1],2),'Color',[0 0 1]) +line(p([9,8],1),p([9,8],2),'Color',[0 1 0]) +line(p([8,7],1),p([8,7],2),'Color',[0 1 0]) + +figure(6) +scatter(x,y); +line(p([1,2],1),p([1,2],2),'Color',[0 0 1]) +line(p([3,2],1),p([3,2],2),'Color',[0 0 1]) +line(p([7,6],1),p([7,6],2),'Color',[0 0 1]) +line(p([3,6],1),p([3,6],2),'Color',[0 0 1]) +line(p([9,1],1),p([9,1],2),'Color',[0 0 1]) +line(p([9,8],1),p([9,8],2),'Color',[0 0 1]) +line(p([8,7],1),p([8,7],2),'Color',[0 0 1]) + + diff --git a/mr/ubA/A1c/step1.fig b/mr/ubA/A1c/step1.fig new file mode 100644 index 0000000..8cd2b16 --- /dev/null +++ b/mr/ubA/A1c/step1.fig Binary files differ diff --git a/mr/ubA/A1c/step1.png b/mr/ubA/A1c/step1.png new file mode 100644 index 0000000..a08c90b --- /dev/null +++ b/mr/ubA/A1c/step1.png Binary files differ diff --git a/mr/ubA/A1c/step2.fig b/mr/ubA/A1c/step2.fig new file mode 100644 index 0000000..da19758 --- /dev/null +++ b/mr/ubA/A1c/step2.fig Binary files differ diff --git a/mr/ubA/A1c/step2.png b/mr/ubA/A1c/step2.png new file mode 100644 index 0000000..a34e364 --- /dev/null +++ b/mr/ubA/A1c/step2.png Binary files differ diff --git a/mr/ubA/A1c/step3.fig b/mr/ubA/A1c/step3.fig new file mode 100644 index 0000000..4a32f82 --- /dev/null +++ b/mr/ubA/A1c/step3.fig Binary files differ diff --git a/mr/ubA/A1c/step3.png b/mr/ubA/A1c/step3.png new file mode 100644 index 0000000..e1360b3 --- /dev/null +++ b/mr/ubA/A1c/step3.png Binary files differ diff --git a/mr/ubA/A1c/step4.fig b/mr/ubA/A1c/step4.fig new file mode 100644 index 0000000..42f4163 --- /dev/null +++ b/mr/ubA/A1c/step4.fig Binary files differ diff --git a/mr/ubA/A1c/step4.png b/mr/ubA/A1c/step4.png new file mode 100644 index 0000000..41f321c --- /dev/null +++ b/mr/ubA/A1c/step4.png Binary files differ diff --git a/mr/ubA/A1c/step5.fig b/mr/ubA/A1c/step5.fig new file mode 100644 index 0000000..fd65259 --- /dev/null +++ b/mr/ubA/A1c/step5.fig Binary files differ diff --git a/mr/ubA/A1c/step5.png b/mr/ubA/A1c/step5.png new file mode 100644 index 0000000..c2c09ac --- /dev/null +++ b/mr/ubA/A1c/step5.png Binary files differ diff --git a/mr/ubA/A1c/step6.fig b/mr/ubA/A1c/step6.fig new file mode 100644 index 0000000..d033294 --- /dev/null +++ b/mr/ubA/A1c/step6.fig Binary files differ diff --git a/mr/ubA/A1c/step6.png b/mr/ubA/A1c/step6.png new file mode 100644 index 0000000..93930c0 --- /dev/null +++ b/mr/ubA/A1c/step6.png Binary files differ diff --git a/mr/ubA/A2/A2.m b/mr/ubA/A2/A2.m new file mode 100644 index 0000000..3f72f35 --- /dev/null +++ b/mr/ubA/A2/A2.m @@ -0,0 +1,134 @@ +start=[3,7] +start= [8,2] +goal=[8,8] + +d=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 + -1,-1,inf,inf,-1,inf,inf,inf,inf,-1 + -1,inf,inf,inf,-1,inf,inf,inf,inf,-1 + -1,inf,inf,inf,-1,-1,inf,inf,inf,-1 + -1,inf,-1,inf,inf,-1,-1,inf,-1,-1 + -1,inf,-1,inf,-1,-1,-1,inf,-1,-1 + -1,inf,-1,inf,inf,inf,inf,inf,inf,-1 + -1,inf,-1,inf,inf,inf,inf,inf,inf,-1 + -1,-1,-1,-1,-1,-1,-1,-1,-1,-1]; +latexmat(d, '%g') +d(start(1),start(2))= 0; +d; +%make d template to show changes +dvt= d; +for e= 1:size(d,1) + for f= 1:size(d,2) + if dvt(e,f)>-1 + dvt(e,f)= NaN; + end + end +end +dvt; +d; +changed = true; +s2= sqrt(2); +step=-1; +while changed + step=step+1 + changed= false; + dv= dvt; + for y = size(d,1)-1:-1:2%forward scan + for x = 2:size(d,2)-1 + if(d(y,x) >-1) + a=[d(y,x)]; + if(d(y,x-1) >-1) + a=[a d(y,x-1)+1]; + end + if(d(y,x+1) >-1) + a=[a d(y,x+1)+s2]; + end + if(d(y+1,x)>-1) + a=[a d(y+1,x)+1]; + end + if d(y+1,x-1) >-1 + a=[a d(y+1,x-1)+s2]; + end + + mi = min(a); + if(mi~=d(y,x)); + changed = true; + end + if(d(y,x)~=mi) + dv(y,x)=mi; + end + d(y,x) = mi; + + + end + end + end + forward=0 + d; + dv; + latexmat(dv, '%g') + dv=dvt; + for y = 2:size(d,1)-1%backward scan + for x = size(d,2)-1:-1:2 + if(d(y,x) >-1) + a=[d(y,x)]; + if(d(y,x+1) >-1) + a=[a d(y,x+1)+1]; + end + if(d(y-1,x-1) >-1) + a=[a d(y-1,x-1)+s2]; + end + if(d(y-1,x)>-1) + a=[a d(y-1,x)+1]; + end + if d(y-1,x+1) >-1 + a=[a d(y-1,x+1)+s2]; + end + mi = min(a); + if(mi~=d(y,x)) + changed = true; + end + if(d(y,x)~=mi) + dv(y,x)=mi; + end + d(y,x) = mi; + + end + end + end + backward=0 + step + d; + dv; + latexmat(dv, '%g') +end +%plot gradient +colormap(gray) +imagesc(d) + +%get gradient path. +cp= goal; +path =goal; + + +while ~isequal(cp,start) + neighbours=[]; + for x = [cp(1)-1:cp(1)+1] + for y=[cp(2)-1:cp(2)+1] + if ~isequal([x,y],cp) && (d(x,y)>-1) + neighbours = cat(1,neighbours,[x,y]); + end + end + end + nv=[]; + for i = 1:size(neighbours,1) + yy=neighbours(i,:); + nv = [nv d(yy(1),yy(2))]; + end + [m,minindex] = min(nv); + m; + cp= neighbours(minindex,:); + path = cat(1,cp,path); +end +path +latexmat(path, '%g') + diff --git a/mr/ubA/A2/gradientA.png b/mr/ubA/A2/gradientA.png new file mode 100644 index 0000000..830331a --- /dev/null +++ b/mr/ubA/A2/gradientA.png Binary files differ diff --git a/mr/ubA/A2/gradientAb.png b/mr/ubA/A2/gradientAb.png new file mode 100644 index 0000000..369b082 --- /dev/null +++ b/mr/ubA/A2/gradientAb.png Binary files differ diff --git a/mr/ubA/A2/gradientB.png b/mr/ubA/A2/gradientB.png new file mode 100644 index 0000000..c809b19 --- /dev/null +++ b/mr/ubA/A2/gradientB.png Binary files differ diff --git a/mr/ubA/A2/gradientBb.png b/mr/ubA/A2/gradientBb.png new file mode 100644 index 0000000..6f88db2 --- /dev/null +++ b/mr/ubA/A2/gradientBb.png Binary files differ diff --git a/mr/ubA/A2/latexmat.m b/mr/ubA/A2/latexmat.m new file mode 100644 index 0000000..ee02256 --- /dev/null +++ b/mr/ubA/A2/latexmat.m @@ -0,0 +1,52 @@ +function str = latexmat(mat, format) +%LATEXMAT Generate LaTeX code for a matrix. +% +% STR = LATEXMAT(MAT, FORMAT) return the LaTeX code for the matrix MAT, with +% the given FORMAT. +% +% See HELP SPRINTF for more details about the FORMAT parameter. + +% Author: Peter John Acklam +% Time-stamp: 2003-07-12 22:14:14 +0200 +% E-mail: pjacklam@online.no +% URL: http://home.online.no/~pjacklam + + error(nargchk(2, 2, nargin)); + + if ischar(mat) + error('First argument can not be a string.'); + end + + if ~ischar(format) + error('Second argument must be a string.'); + end + + [ r, c ] = size(mat); + + newline = sprintf('\n'); + + str = [ '\left[ \begin{array}{' ... + char(abs('c')*ones(1,c)) '}' newline ]; + + for i = 1:r + str = [ str ' ' ]; + for j = 1:c + t = sprintf(format, real(mat(i,j))); + if (imag(mat(i,j)) > 0) + t = [ t '+' sprintf(format, imag(mat(i,j))) 'i' ]; + elseif (imag(mat(i,j)) < 0) + t = [ t '-' sprintf(format, -imag(mat(i,j))) 'i' ]; + end + str = [ str ' ' t ]; + if j < c + str = [ str ' &' ]; + else + if i < r + str = [ str ' \\' newline ]; + else + str = [ str newline ]; + end + end + end + end + str = [ str '\end{array} \right]' newline ]; diff --git a/mr/ubA/assignment10.pdf b/mr/ubA/assignment10.pdf new file mode 100644 index 0000000..e76391a --- /dev/null +++ b/mr/ubA/assignment10.pdf Binary files differ diff --git a/mr/ubA/assignment10_presets.pdf b/mr/ubA/assignment10_presets.pdf new file mode 100644 index 0000000..46c7208 --- /dev/null +++ b/mr/ubA/assignment10_presets.pdf Binary files differ diff --git a/mr/ubA/assignment10_presets.tex b/mr/ubA/assignment10_presets.tex new file mode 100644 index 0000000..05849ba --- /dev/null +++ b/mr/ubA/assignment10_presets.tex @@ -0,0 +1,176 @@ +\documentclass[a4paper,12pt]{article} + +\usepackage[english]{babel} % fuer deutsche Einstellungen +% \usepackage[german]{babel} +% \usepackage[T1]{fontenc} +\usepackage[utf8]{inputenc} % fuer Umlaute +\usepackage{amssymb} +\usepackage{amsfonts} +\usepackage{epsfig} % fuer Abbildungen +%\usepackage{german} +\usepackage{url} +\usepackage{mathcomp} +% +\usepackage{amssymb} +\usepackage{amsmath} +\usepackage{amsthm} +\usepackage[autolanguage]{numprint} +\usepackage{siunitx} + +\usepackage{tikz} +\usepackage{tikz,fullpage} +\usetikzlibrary{arrows,shapes} +\usepackage{float} + +\usepackage{hyperref} +\usepackage{enumerate} +\usepackage{multicol} + +\clubpenalty = 10000 +\widowpenalty = 10000 \displaywidowpenalty = 10000 + +\relpenalty=9999 +\binoppenalty=9999 + +\newcommand*{\xMax}{24}% +\newcommand*{\yMax}{24}% + +\begin{document} + +\newcommand{\presetDta}{ +\begin{tikzpicture}[scale=0.8]\draw[step=1.0cm,color=gray] (0,0) grid (9, 9); + +\draw [fill=black!50] (0, 8)rectangle (1, 9);\node at (0.5, 8.5) {};\draw [fill=black!50] (1, 8)rectangle (2, 9);\node at (1.5, 8.5) {};\draw [fill=black!50] (2, 8)rectangle (3, 9);\node at (2.5, 8.5) {};\draw [fill=black!50] (3, 8)rectangle (4, 9);\node at (3.5, 8.5) {};\draw [fill=black!50] (4, 8)rectangle (5, 9);\node at (4.5, 8.5) {};\draw [fill=black!50] (5, 8)rectangle (6, 9);\node at (5.5, 8.5) {};\draw [fill=black!50] (6, 8)rectangle (7, 9);\node at (6.5, 8.5) {};\draw [fill=black!50] (7, 8)rectangle (8, 9);\node at (7.5, 8.5) {};\draw [fill=black!50] (8, 8)rectangle (9, 9);\node at (8.5, 8.5) {};\draw [fill=black!50] (9, 8)rectangle (10, 9); + +\draw [fill=black!50] (0, 7)rectangle (1, 8);\node at (0.5, 7.5) {};\draw [fill=black!50] (1, 7)rectangle (2, 8);\node at (1.5, 7.5) {};\draw [fill=white] (2, 7)rectangle (3, 8);\node at (2.5, 7.5) {};\draw [fill=white] (3, 7)rectangle (4, 8);\node at (3.5, 7.5) {};\draw [fill=black!50] (4, 7)rectangle (5, 8);\node at (4.5, 7.5) {};\draw [fill=white] (5, 7)rectangle (6, 8);\node at (5.5, 7.5) {};\draw [fill=white] (6, 7)rectangle (7, 8);\node at (6.5, 7.5) {};\draw [fill=white] (7, 7)rectangle (8, 8);\node at (7.5, 7.5) {};\draw [fill=white] (8, 7)rectangle (9, 8);\node at (8.5, 7.5) {};\draw [fill=black!50] (9, 7)rectangle (10, 8); + +\draw [fill=black!50] (0, 6)rectangle (1, 7);\node at (0.5, 6.5) {};\draw [fill=white] (1, 6)rectangle (2, 7);\node at (1.5, 6.5) {};\draw [fill=white] (2, 6)rectangle (3, 7);\node at (2.5, 6.5) {};\draw [fill=white] (3, 6)rectangle (4, 7);\node at (3.5, 6.5) {};\draw [fill=black!50] (4, 6)rectangle (5, 7);\node at (4.5, 6.5) {};\draw [fill=white] (5, 6)rectangle (6, 7);\node at (5.5, 6.5) {};\draw [fill=yellow] (6, 6)rectangle (7, 7);\node at (6.5, 6.5) {$B$};\draw [fill=white] (7, 6)rectangle (8, 7);\node at (7.5, 6.5) {};\draw [fill=white] (8, 6)rectangle (9, 7);\node at (8.5, 6.5) {};\draw [fill=black!50] (9, 6)rectangle (10, 7); + +\draw [fill=black!50] (0, 5)rectangle (1, 6);\node at (0.5, 5.5) {};\draw [fill=white] (1, 5)rectangle (2, 6);\node at (1.5, 5.5) {};\draw [fill=white] (2, 5)rectangle (3, 6);\node at (2.5, 5.5) {};\draw [fill=white] (3, 5)rectangle (4, 6);\node at (3.5, 5.5) {};\draw [fill=black!50] (4, 5)rectangle (5, 6);\node at (4.5, 5.5) {};\draw [fill=black!50] (5, 5)rectangle (6, 6);\node at (5.5, 5.5) {};\draw [fill=white] (6, 5)rectangle (7, 6);\node at (6.5, 5.5) {};\draw [fill=white] (7, 5)rectangle (8, 6);\node at (7.5, 5.5) {};\draw [fill=white] (8, 5)rectangle (9, 6);\node at (8.5, 5.5) {};\draw [fill=black!50] (9, 5)rectangle (10, 6); + +\draw [fill=black!50] (0, 4)rectangle (1, 5);\node at (0.5, 4.5) {};\draw [fill=white] (1, 4)rectangle (2, 5);\node at (1.5, 4.5) {};\draw [fill=black!50] (2, 4)rectangle (3, 5);\node at (2.5, 4.5) {};\draw [fill=white] (3, 4)rectangle (4, 5);\node at (3.5, 4.5) {};\draw [fill=white] (4, 4)rectangle (5, 5);\node at (4.5, 4.5) {};\draw [fill=black!50] (5, 4)rectangle (6, 5);\node at (5.5, 4.5) {};\draw [fill=black!50] (6, 4)rectangle (7, 5);\node at (6.5, 4.5) {};\draw [fill=white] (7, 4)rectangle (8, 5);\node at (7.5, 4.5) {};\draw [fill=black!50] (8, 4)rectangle (9, 5);\node at (8.5, 4.5) {};\draw [fill=black!50] (9, 4)rectangle (10, 5); + +\draw [fill=black!50] (0, 3)rectangle (1, 4);\node at (0.5, 3.5) {};\draw [fill=white] (1, 3)rectangle (2, 4);\node at (1.5, 3.5) {};\draw [fill=black!50] (2, 3)rectangle (3, 4);\node at (2.5, 3.5) {};\draw [fill=white] (3, 3)rectangle (4, 4);\node at (3.5, 3.5) {};\draw [fill=black!50] (4, 3)rectangle (5, 4);\node at (4.5, 3.5) {};\draw [fill=black!50] (5, 3)rectangle (6, 4);\node at (5.5, 3.5) {};\draw [fill=black!50] (6, 3)rectangle (7, 4);\node at (6.5, 3.5) {};\draw [fill=white] (7, 3)rectangle (8, 4);\node at (7.5, 3.5) {};\draw [fill=black!50] (8, 3)rectangle (9, 4);\node at (8.5, 3.5) {};\draw [fill=black!50] (9, 3)rectangle (10, 4); + +\draw [fill=black!50] (0, 2)rectangle (1, 3);\node at (0.5, 2.5) {};\draw [fill=white] (1, 2)rectangle (2, 3);\node at (1.5, 2.5) {};\draw [fill=black!50] (2, 2)rectangle (3, 3);\node at (2.5, 2.5) {};\draw [fill=white] (3, 2)rectangle (4, 3);\node at (3.5, 2.5) {};\draw [fill=white] (4, 2)rectangle (5, 3);\node at (4.5, 2.5) {};\draw [fill=white] (5, 2)rectangle (6, 3);\node at (5.5, 2.5) {};\draw [fill=white] (6, 2)rectangle (7, 3);\node at (6.5, 2.5) {};\draw [fill=white] (7, 2)rectangle (8, 3);\node at (7.5, 2.5) {};\draw [fill=white] (8, 2)rectangle (9, 3);\node at (8.5, 2.5) {};\draw [fill=black!50] (9, 2)rectangle (10, 3); + +\draw [fill=black!50] (0, 1)rectangle (1, 2);\node at (0.5, 1.5) {};\draw [fill=yellow] (1, 1)rectangle (2, 2);\node at (1.5, 1.5) {$A$};\draw [fill=black!50] (2, 1)rectangle (3, 2);\node at (2.5, 1.5) {};\draw [fill=white] (3, 1)rectangle (4, 2);\node at (3.5, 1.5) {};\draw [fill=white] (4, 1)rectangle (5, 2);\node at (4.5, 1.5) {};\draw [fill=white] (5, 1)rectangle (6, 2);\node at (5.5, 1.5) {};\draw [fill=white] (6, 1)rectangle (7, 2);\node at (6.5, 1.5) {};\draw [fill=yellow] (7, 1)rectangle (8, 2);\node at (7.5, 1.5) {$G$};\draw [fill=white] (8, 1)rectangle (9, 2);\node at (8.5, 1.5) {};\draw [fill=black!50] (9, 1)rectangle (10, 2); + +\draw [fill=black!50] (0, 0)rectangle (1, 1);\node at (0.5, 0.5) {};\draw [fill=black!50] (1, 0)rectangle (2, 1);\node at (1.5, 0.5) {};\draw [fill=black!50] (2, 0)rectangle (3, 1);\node at (2.5, 0.5) {};\draw [fill=black!50] (3, 0)rectangle (4, 1);\node at (3.5, 0.5) {};\draw [fill=black!50] (4, 0)rectangle (5, 1);\node at (4.5, 0.5) {};\draw [fill=black!50] (5, 0)rectangle (6, 1);\node at (5.5, 0.5) {};\draw [fill=black!50] (6, 0)rectangle (7, 1);\node at (6.5, 0.5) {};\draw [fill=black!50] (7, 0)rectangle (8, 1);\node at (7.5, 0.5) {};\draw [fill=black!50] (8, 0)rectangle (9, 1);\node at (8.5, 0.5) {};\draw [fill=black!50] (9, 0)rectangle (10, 1); +\end{tikzpicture} + +\vspace{0.25cm} +} + +\newcommand{\presetOone}{ +\renewcommand*{\xMax}{23}% +\renewcommand*{\yMax}{23}% +\begin{tikzpicture}[scale=0.3, axis/.style={very thick, ->, >=stealth'}] + % grid + \draw[very thin, gray!50] (0,0) grid (\xMax, \yMax); + + % axis + \draw[axis] + (0,0) -> coordinate (x axis mid) (\xMax,0); + \draw[axis] + (0,0) -> coordinate (y axis mid) (0,\yMax); + + % labels + \foreach \i in {0,5,...,\xMax} { + \draw [very thick] (\i cm,5pt) -- (\i cm,-5pt) node [below] at (\i,0) {\i}; + } + \foreach \i in {0,5,...,\yMax} { + \draw [very thick] (5pt,\i cm) -- (-5pt,\i cm) node [left] at (0,\i) {\i}; + } + + % O1 + \draw[thick] (4, 3) -- (7, 12) -- (20, 9) -- (15, 19) -- (2, 20) -- cycle; +\end{tikzpicture} +} + + +\newcommand{\presetOtwo}{ +\renewcommand*{\xMax}{51}% +\renewcommand*{\yMax}{26}% +\begin{tikzpicture}[scale=0.25, axis/.style={very thick, ->, >=stealth'}] + % grid + \draw[very thin, gray!50] (21,0) grid (\xMax, \yMax); + + % labels + \foreach \i in {25,30,...,\xMax} { + \draw [very thick] (\i cm,-0.25) -- (\i cm,0.25) node [below] at (\i,0) {\i}; + } + \foreach \i in {5,10,...,\yMax} { + \draw [very thick] (20.75,\i cm) -- (21.25,\i cm) node [left] at (21,\i) {\i}; + } + + % O2 + \draw[thick] (27, 1) -- + (35, 1) -- + (38, 4) -- + (34, 9) -- + (44, 8) -- + (50, 19) -- + (44, 25) -- + (24, 25) -- + (30, 18) -- + (24, 10) -- cycle; + + +\end{tikzpicture} +\vspace{0.25cm} +} +\begin{multicols}{2} + +\presetDta + +\presetDta + +\presetDta + +\presetDta + +\presetDta + +\presetDta + +\end{multicols} + +\clearpage + +\begin{multicols}{2} + +\presetOone + +\presetOone + +\presetOone + +\presetOone + +\presetOone + +\presetOone + +\end{multicols} + + +\clearpage + +\begin{multicols}{2} + +\presetOtwo + +\presetOtwo + +\presetOtwo + +\presetOtwo + +\presetOtwo + +\presetOtwo + +\end{multicols} + +\end{document} diff --git a/mr/ubA/mr10.pdf b/mr/ubA/mr10.pdf new file mode 100644 index 0000000..958e67d --- /dev/null +++ b/mr/ubA/mr10.pdf Binary files differ diff --git a/mr/ubA/mr10.tex b/mr/ubA/mr10.tex new file mode 100644 index 0000000..76cc542 --- /dev/null +++ b/mr/ubA/mr10.tex @@ -0,0 +1,318 @@ +\documentclass[a4paper,12pt]{scrartcl} +\usepackage[ngerman]{babel} +\usepackage{graphicx} %BIlder einbinden +\usepackage{amsmath} %erweiterte Mathe-Zeichen +\usepackage{amsfonts} %weitere fonts +\usepackage[utf8]{inputenc} %Umlaute & Co +\usepackage{hyperref} %Links +\usepackage{ifthen} %ifthenelse +\usepackage{enumerate} +\usepackage{pdfpages} +\usepackage{algpseudocode} %Pseudocode +\usepackage{dsfont} % schöne Zahlenräumezeichen +\usepackage{amssymb, amsthm} %noch stärker erweiterte Mathe-Zeichen +\usepackage{tikz} %TikZ ist kein Zeichenprogramm +\usetikzlibrary{trees,automata,arrows,shapes} +\usepackage{qtree} +\usepackage{listings} +\lstset{language=Matlab} + +\pagestyle{empty} + + +\topmargin-50pt + +\newcounter{aufgabe} +\def\tand{&} + +\newcommand{\makeTableLine}[2][0]{% + \setcounter{aufgabe}{1}% + \whiledo{\value{aufgabe} < #1}% + {% + #2\tand\stepcounter{aufgabe}% + } +} + +\newcommand{\aufgTable}[1]{ + \def\spalten{\numexpr #1 + 1 \relax} + \begin{tabular}{|*{\spalten}{p{1cm}|}} + \makeTableLine[\spalten]{A\theaufgabe}$\Sigma$~~\\ \hline + \rule{0pt}{15pt}\makeTableLine[\spalten]{}\\ + \end{tabular} +} + +\def\header#1#2#3#4#5#6#7{\pagestyle{empty} +\begin{minipage}[t]{0.47\textwidth} +\begin{flushleft} +{\bf #4}\\ +#5 +\end{flushleft} +\end{minipage} +\begin{minipage}[t]{0.5\textwidth} +\begin{flushright} +#6 \vspace{0.5cm}\\ +% Number of Columns Definition of Columns second empty line +% \begin{tabular}{|*{5}{C{1cm}|}}\hline A1&A2&A3&A4&$\Sigma$\\\hline&&&&\\\hline\end{tabular}\\\vspace*{0.1cm} +\aufgTable{#7} +\end{flushright} +\end{minipage} +\vspace{1cm} +\begin{center} +{\Large\bf Assignment #1} + +{(Hand-in date #3)} +\end{center} +} + + + +%counts the exercisenumber +\newcounter{n} + +%Kommando für Aufgaben +%\Aufgabe{AufgTitel}{Punktezahl} +\newcommand{\Aufgabe}[2]{\stepcounter{n} +\textbf{Exercise \arabic{n}: #1} (#2 Punkte)\\} + +\newcommand{\Normal}[3]{\mathcal{N}\left(#1,#2,#3\right)} +\newcommand{\Normalf}[3]{\frac{\left|#3\right|^{-\frac{1}{2}}}{\sqrt{2\pi}}e^{-\frac{\left(#1 - #2 \right)^2\cdot \left(#3\right)^{-1}}{2}}} + + + + +\begin{document} + %\header{BlattNr}{Tutor}{Abgabedatum}{Vorlesungsname}{Namen}{Semester}{Anzahl Aufgaben} + \header{10}{}{2015-07-07}{Mobile Robots}{ + \textit{Jan-Peter Hohloch}\\ \textit{Maximus Mutschler} + }{SS 15}{2} + \vspace{1cm} + + \Aufgabe{Convex Hull Algorithms}{10} + \begin{enumerate}[(a)] +\item \includegraphics[width=0.7\linewidth]{A1a} + \item \includegraphics[width=0.7\linewidth]{A1b} + ~\\$ \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|} + 1&2&3&4&5&6&7&8&9&10\\ + \hline + 2&3&4&5&6&7&8&9&10&9\\ + 1&2&2&4&4&6&7&8&9&8\\ + & 1&1&2&2&4&6&7&8&7\\ + && &1&1&2&4&6&7&6\\ + &&&& &1&2&4&6&4\\ + &&&&&& 1&2&4&2\\ + &&&&&&& 1&2&1\\ + &&&&&&&& 1&\\ + &&&&&&&&&\\ + \end{tabular}$\\ + S pushes the new point if it is on the left of the line through the two highest elements of the stack.\\ + S pops elements until the new point is on the right of the resultin line. + \item \pagebreak~ +\includegraphics[width=0.48\textwidth]{A1c/step1} +\includegraphics[width=0.48\textwidth]{A1c/step2} +\includegraphics[width=0.48\textwidth]{A1c/step3} +\includegraphics[width=0.48\textwidth]{A1c/step4} +\includegraphics[width=0.48\textwidth]{A1c/step5} +\includegraphics[width=0.48\textwidth]{A1c/step6} + + + \item Sklansky's algorithm runs in linear time, i.e. $\mathcal{O}(n)$ + \item QuickHull has a worst case runningtime of $\mathcal{O}(n^2)$, when there are no points that can be ignored. A geometric example of the worst case is a cylindric obstacle because a circle doesn't allow any point to be ignored because the drawn line is always nearer to the circles center then a point on the circle. + \end{enumerate} + \pagebreak + \Aufgabe{Path Planning by dynamic programming}{10} + \begin{enumerate}[(a)] + \item $\left[ \begin{array}{cccccccccc} + -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 \\ + -1 & -1 & Inf & Inf & -1 & Inf & Inf & Inf & Inf & -1 \\ + -1 & Inf & Inf & Inf & -1 & Inf & Inf & Inf & Inf & -1 \\ + -1 & Inf & Inf & Inf & -1 & -1 & Inf & Inf & Inf & -1 \\ + -1 & Inf & -1 & Inf & Inf & -1 & -1 & Inf & -1 & -1 \\ + -1 & Inf & -1 & Inf & -1 & -1 & -1 & Inf & -1 & -1 \\ + -1 & Inf & -1 & Inf & Inf & Inf & Inf & Inf & Inf & -1 \\ + -1 & Inf & -1 & Inf & Inf & Inf & Inf & Inf & Inf & -1 \\ + -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 + \end{array} \right]$ + + \item Point A:\\ + forward1:\\ + $\left[ \begin{array}{cccccccccc} + -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 \\ + -1 & -1 & 6.41421 & 6.82843 & -1 & - & - & - & - & -1 \\ + -1 & 5 & 5.41421 & 5.82843 & occ & - & - & - & - & occ \\ + occ & 4 & 4.41421 & 5.41421 & occ & occ & - & - & - & occ \\ + occ & 3 & occ & - & - & occ & occ & - & occ & occ \\ + occ & 2 & occ & - & occ & occ & occ & - & occ & occ \\ + occ & 1 & occ & - & - & - & - & - & - & occ \\ + occ & - & occ & - & - & - & - & - & - & occ \\ + occ & occ & occ & occ & occ & occ & occ & occ & occ & occ + \end{array} \right]$\\ + backward1:\\ + $\left[ \begin{array}{cccccccccc} + occ & occ & occ & occ & occ & occ & occ & occ & occ & occ \\ + occ & occ & - & - & occ & - & - & - & - & occ \\ + occ & - & - & - & occ & - & - & - & - & occ \\ + occ & - & - & - & occ & occ & - & - & - & occ \\ + occ & - & occ & 5.82843 & 6.82843 & occ & occ & - & occ & occ \\ + occ & - & occ & 6.82843 & occ & occ & occ & - & occ & occ \\ + occ & - & occ & 7.82843 & 8.24264 & - & - & - & - & occ \\ + occ & - & occ & 8.82843 & 9.24264 & 9.65685 & - & - & - & occ \\ + occ & occ & occ & occ & occ & occ & occ & occ & occ & occ + \end{array} \right]$\\ + forward2:\\ + $\left[ \begin{array}{cccccccccc} + occ & occ & occ & occ & occ & occ & occ & occ & occ & occ \\ + occ & occ & - & - & occ & - & - & 15.6569 & 16.0711 & occ \\ + occ & - & - & - & occ & - & - & 14.6569 & 15.0711 & occ \\ + occ & - & - & - & occ & occ & - & 13.6569 & 14.0711 & occ \\ + occ & - & occ & - & - & occ & occ & 12.6569 & occ & occ \\ + occ & - & occ & - & occ & occ & occ & 11.6569 & occ & occ \\ + occ & - & occ & - & - & 9.24264 & 10.2426 & 11.2426 & 12.2426 & occ \\ + occ & - & occ & - & - & - & 10.6569 & 11.6569 & 12.6569 & occ \\ + occ & occ & occ & occ & occ & occ & occ & occ & occ & occ + \end{array} \right]$\\ + backward2:\\ + $\left[ \begin{array}{cccccccccc} + occ & occ & occ & occ & occ & occ & occ & occ & occ & occ \\ + occ & occ & - & - & occ & 17.6569 & 16.6569 & - & - & occ \\ + occ & - & - & - & occ & 16.6569 & 15.6569 & - & - & occ \\ + occ & - & - & - & occ & occ & 14.6569 & - & - & occ \\ + occ & - & occ & - & - & occ & occ & - & occ & occ \\ + occ & - & occ & - & occ & occ & occ & - & occ & occ \\ + occ & - & occ & - & - & - & - & - & - & occ \\ + occ & - & occ & - & - & - & - & - & - & occ \\ + occ & occ & occ & occ & occ & occ & occ & occ & occ & occ + \end{array} \right]$\\ + forward3\\ + $\left[ \begin{array}{cccccccccc} + occ & occ & occ & occ & occ & occ & occ & occ & occ & occ \\ + occ & occ & - & - & occ & - & - & - & - & occ \\ + occ & - & - & - & occ & - & - & - & - & occ \\ + occ & - & - & - & occ & occ & - & - & - & occ \\ + occ & - & occ & - & - & occ & occ & - & occ & occ \\ + occ & - & occ & - & occ & occ & occ & - & occ & occ \\ + occ & - & occ & - & - & - & - & - & - & occ \\ + occ & - & occ & - & - & - & - & - & - & occ \\ + occ & occ & occ & occ & occ & occ & occ & occ & occ & occ + \end{array} \right]$\\ + backward3\\ + $\left[ \begin{array}{cccccccccc} + occ & occ & occ & occ & occ & occ & occ & occ & occ & occ \\ + occ & occ & - & - & occ & - & - & - & - & occ \\ + occ & - & - & - & occ & - & - & - & - & occ \\ + occ & - & - & - & occ & occ & - & - & - & occ \\ + occ & - & occ & - & - & occ & occ & - & occ & occ \\ + occ & - & occ & - & occ & occ & occ & - & occ & occ \\ + occ & - & occ & - & - & - & - & - & - & occ \\ + occ & - & occ & - & - & - & - & - & - & occ \\ + occ & occ & occ & occ & occ & occ & occ & occ & occ & occ + \end{array} \right]$ + \\ + Point B:\\ + forward1:\\ + $\left[ \begin{array}{cccccccccc} + occ & occ & occ & occ & occ & occ & occ & occ & occ & occ \\ + occ & occ & - & - & occ & 2.41421 & 1 & 1.41421 & 2.41421 & occ \\ + occ & - & - & - & occ & 1.41421 & - & 1 & 2 & occ \\ + occ & - & - & - & occ & occ & - & - & - & occ \\ + occ & - & occ & - & - & occ & occ & - & occ & occ \\ + occ & - & occ & - & occ & occ & occ & - & occ & occ \\ + occ & - & occ & - & - & - & - & - & - & occ \\ + occ & - & occ & - & - & - & - & - & - & occ \\ + occ & occ & occ & occ & occ & occ & occ & occ & occ & occ + \end{array} \right]$\\ + backward1:\\ + $\left[ \begin{array}{cccccccccc} + occ & occ & occ & occ & occ & occ & occ & occ & occ & occ \\ + occ & occ & - & - & occ & 2 & - & - & - & occ \\ + occ & - & - & - & occ & 1 & - & - & - & occ \\ + occ & - & - & - & occ & occ & 1 & 1.41421 & 2.41421 & occ \\ + occ & - & occ & - & - & occ & occ & 2.41421 & occ & occ \\ + occ & - & occ & - & occ & occ & occ & 3.41421 & occ & occ \\ + occ & - & occ & 7.82843 & 6.82843 & 5.82843 & 4.82843 & 4.41421 & 4.82843 & occ \\ + occ & - & occ & 8.24264 & 7.24264 & 6.24264 & 5.82843 & 5.41421 & 5.82843 & occ \\ + occ & occ & occ & occ & occ & occ & occ & occ & occ & occ + \end{array} \right]$\\ + forward2:\\ + $\left[ \begin{array}{cccccccccc} + occ & occ & occ & occ & occ & occ & occ & occ & occ & occ \\ + occ & occ & - & 12.8284 & occ & - & - & - & - & occ \\ + occ & - & - & 11.8284 & occ & - & - & - & - & occ \\ + occ & - & - & 10.8284 & occ & occ & - & - & - & occ \\ + occ & - & occ & 9.82843 & 10.2426 & occ & occ & - & occ & occ \\ + occ & - & occ & 8.82843 & occ & occ & occ & - & occ & occ \\ + occ & - & occ & - & - & - & - & - & - & occ \\ + occ & - & occ & - & - & - & - & - & - & occ \\ + occ & occ & occ & occ & occ & occ & occ & occ & occ & occ + \end{array} \right]$\\ + backward2:\\ + $\left[ \begin{array}{cccccccccc} + occ & occ & occ & occ & occ & occ & occ & occ & occ & occ \\ + occ & occ & 13.8284 & - & occ & - & - & - & - & occ \\ + occ & 13.8284 & 12.8284 & - & occ & - & - & - & - & occ \\ + occ & 12.8284 & 11.8284 & - & occ & occ & - & - & - & occ \\ + occ & 13.2426 & occ & - & - & occ & occ & - & occ & occ \\ + occ & 14.2426 & occ & - & occ & occ & occ & - & occ & occ \\ + occ & 15.2426 & occ & - & - & - & - & - & - & occ \\ + occ & 16.2426 & occ & - & - & - & - & - & - & occ \\ + occ & occ & occ & occ & occ & occ & occ & occ & occ & occ + \end{array} \right]$\\ + + forward3\\ + $\left[ \begin{array}{cccccccccc} + occ & occ & occ & occ & occ & occ & occ & occ & occ & occ \\ + occ & occ & - & - & occ & - & - & - & - & occ \\ + occ & - & - & - & occ & - & - & - & - & occ \\ + occ & - & - & - & occ & occ & - & - & - & occ \\ + occ & - & occ & - & - & occ & occ & - & occ & occ \\ + occ & - & occ & - & occ & occ & occ & - & occ & occ \\ + occ & - & occ & - & - & - & - & - & - & occ \\ + occ & - & occ & - & - & - & - & - & - & occ \\ + occ & occ & occ & occ & occ & occ & occ & occ & occ & occ + \end{array} \right]$\\ + backward3\\ + $\left[ \begin{array}{cccccccccc} + occ & occ & occ & occ & occ & occ & occ & occ & occ & occ \\ + occ & occ & - & - & occ & - & - & - & - & occ \\ + occ & - & - & - & occ & - & - & - & - & occ \\ + occ & - & - & - & occ & occ & - & - & - & occ \\ + occ & - & occ & - & - & occ & occ & - & occ & occ \\ + occ & - & occ & - & occ & occ & occ & - & occ & occ \\ + occ & - & occ & - & - & - & - & - & - & occ \\ + occ & - & occ & - & - & - & - & - & - & occ \\ + occ & occ & occ & occ & occ & occ & occ & occ & occ & occ + \end{array} \right]$ + +\pagebreak + \item ~ +Point A:\\ +\includegraphics[width=0.7\linewidth]{A2/gradientAb}\\ +Point B:\\ +\includegraphics[width=0.7\linewidth]{A2/gradientBb} +\pagebreak +\item path a:\\ +$\left[ \begin{array}{cc} +8 & 2 \\ +7 & 2 \\ +6 & 2 \\ +5 & 2 \\ +4 & 3 \\ +5 & 4 \\ +6 & 4 \\ +7 & 5 \\ +7 & 6 \\ +7 & 7 \\ +8 & 8 +\end{array} \right]$\\ +path b:\\ +$\left[ \begin{array}{cc} + 3 & 7 \\ + 4 & 7 \\ + 5 & 8 \\ + 6 & 8 \\ + 7 & 8 \\ + 8 & 8 +\end{array} \right]$ + +\end{enumerate} +\end{document} + diff --git a/mr/ubB/link b/mr/ubB/link new file mode 100644 index 0000000..a7e460a --- /dev/null +++ b/mr/ubB/link @@ -0,0 +1,3 @@ +https://gieseanw.wordpress.com/2012/11/15/reeds-shepp-cars/ + +https://gieseanw.wordpress.com/2012/10/21/a-comprehensive-step-by-step-tutorial-to-computing-dubins-paths/ diff --git a/mr/ubB/mrB.pdf b/mr/ubB/mrB.pdf new file mode 100644 index 0000000..81558bf --- /dev/null +++ b/mr/ubB/mrB.pdf Binary files differ diff --git a/mr/ubB/mrB.tex b/mr/ubB/mrB.tex new file mode 100644 index 0000000..7b842e5 --- /dev/null +++ b/mr/ubB/mrB.tex @@ -0,0 +1,110 @@ +\documentclass[a4paper,12pt]{scrartcl} +\usepackage[ngerman]{babel} +\usepackage{graphicx} %BIlder einbinden +\usepackage{amsmath} %erweiterte Mathe-Zeichen +\usepackage{amsfonts} %weitere fonts +\usepackage[utf8]{inputenc} %Umlaute & Co +\usepackage{hyperref} %Links +\usepackage{ifthen} %ifthenelse +\usepackage{enumerate} +\usepackage{pdfpages} +\usepackage{algpseudocode} %Pseudocode +\usepackage{dsfont} % schöne Zahlenräumezeichen +\usepackage{amssymb, amsthm} %noch stärker erweiterte Mathe-Zeichen +\usepackage{tikz} %TikZ ist kein Zeichenprogramm +\usetikzlibrary{trees,automata,arrows,shapes} +\usepackage{qtree} +\usepackage{listings} +\lstset{language=Matlab} + +\pagestyle{empty} + + +\topmargin-50pt + +\newcounter{aufgabe} +\def\tand{&} + +\newcommand{\makeTableLine}[2][0]{% + \setcounter{aufgabe}{1}% + \whiledo{\value{aufgabe} < #1}% + {% + #2\tand\stepcounter{aufgabe}% + } +} + +\newcommand{\aufgTable}[1]{ + \def\spalten{\numexpr #1 + 1 \relax} + \begin{tabular}{|*{\spalten}{p{1cm}|}} + \makeTableLine[\spalten]{A\theaufgabe}$\Sigma$~~\\ \hline + \rule{0pt}{15pt}\makeTableLine[\spalten]{}\\ + \end{tabular} +} + +\def\header#1#2#3#4#5#6#7{\pagestyle{empty} +\begin{minipage}[t]{0.47\textwidth} +\begin{flushleft} +{\bf #4}\\ +#5 +\end{flushleft} +\end{minipage} +\begin{minipage}[t]{0.5\textwidth} +\begin{flushright} +#6 \vspace{0.5cm}\\ +% Number of Columns Definition of Columns second empty line +% \begin{tabular}{|*{5}{C{1cm}|}}\hline A1&A2&A3&A4&$\Sigma$\\\hline&&&&\\\hline\end{tabular}\\\vspace*{0.1cm} +\aufgTable{#7} +\end{flushright} +\end{minipage} +\vspace{1cm} +\begin{center} +{\Large\bf Assignment #1} + +{(Hand-in date #3)} +\end{center} +} + + + +%counts the exercisenumber +\newcounter{n} + +%Kommando für Aufgaben +%\Aufgabe{AufgTitel}{Punktezahl} +\newcommand{\Aufgabe}[2]{\stepcounter{n} +\textbf{Exercise \arabic{n}: #1} (#2 Punkte)\\} + +\newcommand{\Normal}[3]{\mathcal{N}\left(#1,#2,#3\right)} +\newcommand{\Normalf}[3]{\frac{\left|#3\right|^{-\frac{1}{2}}}{\sqrt{2\pi}}e^{-\frac{\left(#1 - #2 \right)^2\cdot \left(#3\right)^{-1}}{2}}} + + + + +\begin{document} + %\header{BlattNr}{Tutor}{Abgabedatum}{Vorlesungsname}{Namen}{Semester}{Anzahl Aufgaben} + \header{11}{}{2015-07-14}{Mobile Robots}{ + \textit{Jan-Peter Hohloch}\\ \textit{Maximus Mutschler} + }{SS 15}{3} + \vspace{1cm} + + \Aufgabe{Graph Search}{8} + \begin{enumerate}[(a)] + \item $(s)\rightarrow s:(b,e)\rightarrow b:(e,a,c)\rightarrow e:(a,c,f,g)\rightarrow a:(c,f,g)\\\rightarrow c:(f,g,d)\rightarrow f:(g,d,h,z)\rightarrow z$ found $path=(s,e,f,z)$ + \item $((s,0))\rightarrow s: ((b,1),(e,1))\rightarrow b: ((e,1),(a,2),(c,7))\rightarrow e: ((a,2),(g,2),(c,7),(f,7)) \\\rightarrow a:((g,2),(c,5),(f,7))\rightarrow g: ((h,3),(c,5),(f,7),(z,8))\\\rightarrow h:((z,4),(c,5),(f,7))\rightarrow (z,4), path=(s,e,g,h,z)$ + \item $(s,0+2)\rightarrow s:((e,1+1),(b,1+3))\rightarrow e:((g,2+0),(b,1+3),(f,7+1))\\\rightarrow g:((b,1+3),(h,3+1),(z,8+0))\rightarrow b:((h,3+1),(a,2+4),(z,8+0),(c,7+3))\\\rightarrow h:((z,4+0),(a,2+4),(c,7+3))\rightarrow z: path=(s,e,g,h,z)$ + \end{enumerate} + \Aufgabe{Nonholonomic Constraints}{4} + \begin{enumerate}[(a)] + \item $\vec{q}=\begin{pmatrix} + x\\y\\\theta + \end{pmatrix}, f(t,\vec{q},\dot{\vec{q}})=\begin{pmatrix} + 0&1&0 + \end{pmatrix}q(t)-\begin{pmatrix} + 0&1&0 + \end{pmatrix}q(t+1)=\begin{pmatrix} + 0&1&0 + \end{pmatrix}\dot\vec q=0$ + \item nonholonomic, because the derivative of q is used + \end{enumerate} +\end{document} +