How to delete duplicate rows, collect their outputs in general, and create a new table.
The figure below shows the idea required to create the new table
The idea is that if the rows are similar in the two columns (L1,L2), the similar ones must be deleted with the sum of the result in (LL) to form a new table, and the values of the column (LL) change as in the above figure.
The data is in the table above:
{{L1,L2,LL},{0,0,0},{1,0,1/2},{0,1,0},{1,1,1/2},{1,0,0},{2,0,1},{1,1,1/2},{2,1,1}}
I hope the program will be more general when the data increases.
Please Help
(new = old //. {s___, {a_, b_, c_}, m___, {a_, b_, d_}, e___} :> {s, {a, b, c + d}, m, e}) // Grid[#, Frame -> All] &
$\endgroup$