Twisted boundary states and representation of generalized fusion algebra