Answered step by step
Verified Expert Solution
Question
1 Approved Answer
2. Consider the following algorithm (The new Caledonian crow learning algorithm). analyze it and then find the following: 2. their complexity function, then be their
2. Consider the following algorithm (The new Caledonian crow learning algorithm). analyze it and then find the following: 2. their complexity function, then be their Asymptotic analysis functions (ie. 2,0,0). 12 Algorithm 1: NCCLA Algorithm 1 begin 2 t-O; 3 Initialize the crow's behaviors within the family Fin] = [X1 X2.....Xnl : 4 Evaluate each behavior X in F using f(x): 5 Rank all behaviors and determine parent's behavior X, and X2 at positions 1 and 2. respectively.: while termination criterion not met do for each juvenile i in the family F do /* update behavior Xy through either social or asocial learning */ for each attribute in the behavior X; do if rand Sprob then 10 if rand VSL prob then 11 Xijr) - Xpkjir-1): / pk equals either 1 or 2 according to Plprob ./ else 13 Xij(r) = Xsk.t-1); /* sk is any juvenile with a better behavior than i 14 end 15 else 16 ir rand Tagrob then 17 Xij(t) = { + U(0.1) X(XU -XL); /* j is a new random attribute else XiJ!) Xij(t-1); /* keep the previous attributej 20 end end 23 With Rpprob. reinforce certain attributes of the modified Xi using Eq. (6) and Eq. (10): 24 end 25 With Rpprob. parent 1 X1 and parent2 X2 are reinforced according to Eq. (11): 26 Rank all behaviors and select the two best behaviors to be new parents X, and X2: 27 t= t + 1; 28 end 29 Retum the global best solution or accepted (adult-like) behavior X* : 30 end 18 19 end 21 3- Consider the following algorithm (Salp Swarm algorithm), analyze it and then find the following: & their complexity function, then be their Asymptotic analysis functions (ie. 1,0,0). Initialize the salp population xi (i - 1, 2, ..., n) considering ub and lb while (end condition is not satisfied) Calculate the fitness of each search agent (salp) F-the best search agent Update c, by Eq. (3.2) for each salp (x) if (=-1) Update the position of the leading salp by Eq. (3.1) else Update the position of the follower salp by Eq. (3.4) end end Amend the salps based on the upper and lower bounds of variables end return F Pseudo code of the SSA algorithm. 2. Consider the following algorithm (The new Caledonian crow learning algorithm). analyze it and then find the following: 2. their complexity function, then be their Asymptotic analysis functions (ie. 2,0,0). 12 Algorithm 1: NCCLA Algorithm 1 begin 2 t-O; 3 Initialize the crow's behaviors within the family Fin] = [X1 X2.....Xnl : 4 Evaluate each behavior X in F using f(x): 5 Rank all behaviors and determine parent's behavior X, and X2 at positions 1 and 2. respectively.: while termination criterion not met do for each juvenile i in the family F do /* update behavior Xy through either social or asocial learning */ for each attribute in the behavior X; do if rand Sprob then 10 if rand VSL prob then 11 Xijr) - Xpkjir-1): / pk equals either 1 or 2 according to Plprob ./ else 13 Xij(r) = Xsk.t-1); /* sk is any juvenile with a better behavior than i 14 end 15 else 16 ir rand Tagrob then 17 Xij(t) = { + U(0.1) X(XU -XL); /* j is a new random attribute else XiJ!) Xij(t-1); /* keep the previous attributej 20 end end 23 With Rpprob. reinforce certain attributes of the modified Xi using Eq. (6) and Eq. (10): 24 end 25 With Rpprob. parent 1 X1 and parent2 X2 are reinforced according to Eq. (11): 26 Rank all behaviors and select the two best behaviors to be new parents X, and X2: 27 t= t + 1; 28 end 29 Retum the global best solution or accepted (adult-like) behavior X* : 30 end 18 19 end 21 3- Consider the following algorithm (Salp Swarm algorithm), analyze it and then find the following: & their complexity function, then be their Asymptotic analysis functions (ie. 1,0,0). Initialize the salp population xi (i - 1, 2, ..., n) considering ub and lb while (end condition is not satisfied) Calculate the fitness of each search agent (salp) F-the best search agent Update c, by Eq. (3.2) for each salp (x) if (=-1) Update the position of the leading salp by Eq. (3.1) else Update the position of the follower salp by Eq. (3.4) end end Amend the salps based on the upper and lower bounds of variables end return F Pseudo code of the SSA algorithm
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started