火车站检票排队问题:如何计算最少检票窗口数量?
syms x y z n eq1 = x + ny - nz30 == 0; eq2 = x + 2ny - 2nz10 == 0; eq3 = x + 4ny - 4nz*1 == 0; det_coef = det([coeffs(eq1,[x,y,z]); coeffs(eq2,[x,y,z]); coeffs(eq3,[x,y,z])]);
n_min = ceil(solve(det_coef == 0, n)); disp(['至少需要开放' num2str(n_min) '个检票窗口。'])
原文地址: https://www.cveoy.top/t/topic/oG9Z 著作权归作者所有。请勿转载和采集!