recursive MIS weight calculation