algo working in very simple cases

problems to identify in non trivial cases