protected float weight4(String strA, String strB) {
    	// ensure that we do not have any gap
    	if(strA.equals(m_gap) || strB.equals(m_gap)){ return -1; }
    	
    	// compare the two elements
    	int len = strA.length();
    	String urlA = strA.substring(0,len-1);
    	String rolA = strA.substring(len-1,len);
    	int urlAi = m_UrlIDs.indexOf(Integer.valueOf(urlA));
    	int rolAi = this.role2int(rolA);
    	String urlB = strB.substring(0,len-1);
    	String rolB = strB.substring(len-1,len);
    	int urlBi = m_UrlIDs.indexOf(Integer.valueOf(urlB));
    	int rolBi = this.role2int(rolB);
    	
    	// urls distance
    	float wurl = 1f; // initialize with maximum distance
    	if(urlA.equals(urlB)){ // same URL
    		wurl = 0; // minimum distance
    	} else if(urlAi==-1 || urlBi==-1){ // a new URL, does not exists
    		wurl = 1f; // maximum distance
    	} else { // analyze the topics
    		int urlAtopic = m_url2topic[urlAi];
    		int urlBtopic = m_url2topic[urlBi];
    		if(urlAtopic==-1 || urlBtopic==-1){ // topic no available
    			wurl = 1f; // maximum distance
    		} else {
    			if(urlAtopic==urlBtopic){
    				wurl = m_topicmatch;
    			} else {
    				wurl = 1; // maximum distance
    			}
    		}
    	}
    	
    	// roles
    	float score = -1f; // worse score
    	float wrole;
        if(wurl<=m_topicmatch){
        	wrole = m_roleW[rolAi][rolBi];
        	score = (1f-wurl)*wrole;
        } else {
        	wrole = -1f;
        	score = -1f;
        }
        
        return score;
    }