phys123

10 Reputation

One Badge

12 years, 21 days

MaplePrimes Activity


These are questions asked by phys123

Hi,

Help please! Maple beginner here. I'm trying to relabel a list of lists and sets so that the third occurrence of each number becomes that number+1,

 

eg. [[1],[{1,2}],[{1,2}]] ----->  [[1],[{1,2}],[{2,3}]]

or [[1],[{1,2,3}],[{1,2}]] -----> [[1],[{1,2,3}],[{2,3}]]

 

I think because there are sublists and subsets, I can't use things like member(x, s, 'p') or SearchAll (ListTools), so not sure what to do. Any suggestions?

Page 1 of 1