weighted boolean linear equation