Graph Problem - Finding Cliques
Hi Folks,
I'm stuck with a problem involving undirected graphs and was wondering if anyone might be able to help.
I have a Vector containing pairs of letters which represent edges in a graph from one point to another. e.g. 'ab' would be an edge from point 'a' to point 'b'. In many cases this Vector contains a number of sub-graphs e.g.
ab
ac
bc
de
df
ef
{ab, ac, bc} make up one complete sub-graph and {de, df, ef} makes up another, where each point has an edge to all the other points in the group.
I want to be able to identify these sub-graphs and seperate them (or at least identify them as being different groups). In graph theory I believe these groups are known as cliques.
I am only interested in finding maximal cliques (complete sub-groups) and in my particular situation a point will never exist in more than one clique (so no overlapping groups). Also the vector will only ever contain complete sub-graphs (no incomplete sub-graphs where edges are missing).
Does anyone know how to solve this problem? Any help would be greatly appreciated. Please let me know if you need any more info.
Regards,
Jamie
I use the following O(n^4 or less) method in my map-folding algorithm:
static int fastGroups(Group[] group, boolean[][] join, int n) {
int[] g = new int[n];
boolean[] row;
int c = 0, d;
for(int i=0, j, k, m; i<n; i++) {
for(j=i+1; j<n; j++) {
if(!join[ i][j]) continue;
for(m=0; m<c; m++) {
if(group[m].contains(i) && group[m].contains(j)) break;
if(m<c) continue;
for(k=0, d=0; k<n; k++) {
row = join[k];
if(!row[ i] || !row[j]) continue;
for(m=0; m<d; m++) if(!row[g[m]]) break;
if(m==d) g[d++] = k;
group[c++] = new Group(g,d);
group[c] = null;
return c;
}This populates the cliques in the given array and returns the number of cliques.
This method works with "well behaved" groups, where each group can be achieved by choosing some two elements of it and then searching the rest in order of appearance. So if you have the followin cliques (1,4,5), (2,5,6), (3,4,6) and (4,5,6):
1-4-3
5-6
2
you will miss the clique (4,5,6). In your case this should not be a problem.
Similar Messages
-
Problem finding my sound effects and music in final cut pro X
I am having a problem finding my sound effects and music in final cut pro X. I just bought a new i
Mac, because my Mac pro died. when I was using the mac pro, I had final cut Pro X loaded, and in the Music and sound library, I had stock tracks from APM music that came with final cut. now that I have loaded final cut to my new computer, I do not see those tracks. Am I missing something?The FCP X sound effects were an additional external download and were not kept in the FCP X application.
You probably need to re-download them.
In the FCP menu at the top left of your screen you will see the download link. -
Having problems finding and importing actions I recorded in CS5 :(
Hi. I've recently upgraded from CS5 to CC but I'm now having problems finding and importing actions that I previously had recorded in CS5. Where do I need to look to locate these actions, as they are still in CS5 when I open it.
You export them using the flyout menu in the top right corner of the actions palette. Conversely, you load them the same way in the new version.
Mylenium -
Problem Finding External Device In Final Cut Pro 3 & OS 10.4
I upgraded our system from os 10.3 to 10.4. Now when we open Final Cut Pro 3 it can not find the external device. Anyone have any idea why and what we can do to rectify the problem? When I switch back to os 10.3 (Which I still had on a second internal hard drive) FCP3 has no problem finding the external device/camera.
The only other suggestion I have would be the Guiness Solution. (though if 10.3 can locate the external, this may/may not help). Essentially this procedure allows the FW port to 'reset'. It is very simple and painless as well.
Short version...
Shut everything down
Unplug everything
Go have a nap, Guiness, Harpoon, Cafe Colåda, Hot Chocolate, talk a walk...anything to occupy 15 minutes or so.
Come back and plug everything in
Turn on deck/camera first
Make sure System Profiler recognizes FW device (deck/camera)
Start FCP....Does it work now?
If you haven't already, you might trash prefs
http://www.digitalrebellion.com/pref_man.htm
and run Repair Disk, using Disk Utility.
I still wouldn't discount the QT possibility. Even though it worked before your upgrade to Tiger, the upgrade to Tiger, may have triggered something that is causing the issue.
K -
Problems importing with LR 1.3 - Problems finding a location?
When I try to import photos from my camera LR pops up a message saying it's having a problem finding a location to put the imports. Then when I try to import again, it goes without a problem. Has anyone else experienced this?
thanks,
GeoffGeoff-
Can you give the exact message, what you then do? Also, type of image, platform, set up (internal, external drives, room on drive, RAM) -
Mxmlc: Error: Problem finding external Model
Hi,
I am currently trying to compile a flex project with the
mxmlc compiler. Unfortunately I always get this error message:
Error: Problem finding external Model: config.xml
It seems as if this resource cannot be found by the compiler.
All source-paths and libs are are set as in the
.actionScriptProperties file. Other resources such as style sheets
can be found without any problem.
Furthermore, when I write the xml model inline or if I
provide the relative path inline the compiler understands that and
does not show the error.
<mx:Model id="config" source="config.xml"/> => does
not work
<mx:Model id="config" source="../config/config.xml"/>
=> works
What can I do to tell the parser where the config.xml file is
located?How can changing the project's properties affect asdoc.exe if I run it from the command line?
I've tried running it from the bin folder and from the project's src folder always getting the same error.
I went to 'Flex Build Path' in the project's properties window. It contains two tabs: 'Source path' and 'Library Path'. No 'Assets' tab. -
Can some one help me sort problem with Facebook app in settings. When I use app message says problem finding account re-enter password after doing this message says unable to connect to server. I have no problem using Facebook app on home pages.
maybe just a temporary issue with service. Should be working now.
-
TS3276 Has any one had problems finding RSS feeds after upgrading to 10.8?
Has any one had problems finding RSS feeds after upgrading to 10.8?
RSS feeds no longer appear in Mail in Mountain Lion (nor in Safari). You'll need a separate RSS application.
BTW, this forum is for Mac OS X 10.7 Lion. The forum for OS X 10.8 Mountain Lion is this one:
https://discussions.apple.com/community/mac_os/os_x_mountain_lion
Regards. -
Problem finding firmware for Creative MuVo2
Yes as the topic has said , im having problems finding the firmware for this mp3 player which i just bought a few months ago overseas. I was wondering if anyone has them can post em here or give me a link to it so i can download. I kinda accidentally delete it while fixing a problem but instead i created a bigger problem. For 2 days straight i've been surfing around the net just to find it but still no site that has the firmware for it Pls anyone out there , really need your help.. thanx.Message Edited by Ryzcvk on 03-3-2005 07:39 AM
How about this?
-
Excel & ActiveX: Insert arbitrary columns from 2D array and create graph problems
Hi there,
I want to insert data from either a 1D or 2D array from LabView into Excel and create graphs.
I used the information from the following example:
http://www.ni.com/example/28934/en/
and was able to create a new Excel file (I'm using Excel 2010), writing data from an 1D array to a column in excel by creating a while loop and using the first element of the array to write it to a specific cell. I use the counter of the loop to write to the next cell when the loop starts over and always delete the first value, which I write to the cell, from the array until it is empty.
Now I also would like to write a 2D array - so the first column in Excel should be the first column from the array and so. Here I cannot use the loop counter directly as Excel only counts 1,2,... for the rows, but uses A,B,... to count columns. Also I do not know in advance how many columns my 2D array will contain, so creating a lookup table like (A means 1, B means 2,...) is not really an option (except there really is no other way). Is there a possibilty to convert numbers into letters or some way to 'explain' to the program that column 2 in the array means column B in Excel for example, or is there a way to insert new columns?
I figured out how to add new Worksheets and as I also need to create a certain number of Worksheets and I know that on standard 3 sheets are present when creating the file, I use the 'add' methode to create every new worksheets before worksheet 3 - I could use the same methode to create new columns in Excel, but so far I didn't find a methode to do so. Or is there a way to enter the whole 2D array at once?
Then I'd like to create a graph (in case of the 1D arrays a bar plot, when using 2D arrays a 3D plot) to view the data. I found this example:
http://www.ni.com/newsletter/51339/en/
-> as I do not have the toolkit I'd like to do it using ActiveX directly, so I tried to do things like shown under the headline 'DIY ActiveX/.NET'
I tried to load the snippet to a new Excel file but got the error message 'microsoft.office.interop.excel.dll not found' and hence the code is not working. That confuses me a little as I would guess when this dll is not present I cannot access Excel from LabView at all, though my understanding of what I'm really doing so far is quiet limited. ;-)
Also - as far as I understand from the snippet - when creating a new chart object I should be able the create methodes for it, however when I do a right click on the chart object of an ActiveX Worksheet symbol there are none listed.
To explain my problems better I added a snippet showing my two problems: The inner of the two while loops shows how I import a 1D array. In the outer loop I seperate the columns. I know that currently this is not working as all data end up in column A of the Excel sheet - so I would need to convert the number of the outer counter to A, B,... or find a different solution.
Moreover on the snippet I placed an ActiveX Worksheet Property with the Chart Object - as I can see the difference to the Chart Object in the example code from the last link above is the color. However I'm not sure what that means and how to change/ solve this.
And just to make sure - I know this way the VI does not run as the Chart Object is placed completely wrong - I just did it, so it is included in the snippet.
I'd be thankful for any suggestions,
Thanks!
Solved!
Go to Solution.
Attachments:
ExcelAreaScan.png 60 KBHello everyone and thanks for the answers.
I only have the LabView Student Edition available here - is the toolkit included in it too. How can I check if it is installed/ available and in case it is installed - where can I find it?
Today I had time to take a look at the example
Create via ActiveX Labview a XY Scatter plot graph on an excel sheet
It almost does what I want in terms of creating a graph. The only problem I could not fix, is that in this example a sheet is created where only the graph is present. i'd like to add the graph to a previously created worksheet. Today I tried get this working but it seems I stilll don't really understand what I'm doing, I'll post a snippet of my code as soon as I can access the PC with LabView on it again.
I also took a look at the other example for inserting 2D attays - it seems to be what I need, I just had no time so far to test it, I'll post an update when I could test it.
Thanks for the help so far! -
In the last two runs I made, my graph in Run specifics is completely flat, despite very different run speeds during the course. What could cause such a problem?
1. So you cannot access the picture change function ON your Q10?
Open BBM.
To open your BBM profile, Touch the topmost bar where you see your picture
Touch your current avatar at the top left. Your picture will open full screen.
Touch the bottom bar "replace picture" icon.
And proceed from there to find your intended picture and save.
2. What BBMessenger Beta did you download? Please give details.. it helps.
1. If any post helps you please click the below the post(s) that helped you.
2. Please resolve your thread by marking the post "Solution?" which solved it for you!
3. Install free BlackBerry Protect today for backups of contacts and data.
4. Guide to Unlocking your BlackBerry & Unlock Codes
Join our BBM Channels (Beta)
BlackBerry Support Forums Channel
PIN: C0001B7B4 Display/Scan Bar Code
Knowledge Base Updates
PIN: C0005A9AA Display/Scan Bar Code -
Hi,
I'm trying to create an application which would use a JClient Graph for presenting data. So far with no success. Using JClient wizard to create a JPanel with a Graph object on it seems to work fine. Then I place the created panel into a JFrame and compile the program with no errors or warnings. But when I run the program I get an error. The call stack leading to the error begins in the wizard-generated class, on this line: "private Graph graph = new Graph();" and ends up to this code line and error:
java.lang.NullPointerException
at oracle.dss.graph.Graph.setLocale(Graph.java:2839)
What should I do to make the initialization process continue successfully?
I haven't found too much documentation about these JClient graphs, neither in JDeveloper help nor in internet, so I would also appreciate links to any sources where I could find more information on the topic.
- RistoStill no success. Now I can see the graph when I open the wizard-created java-file in UI Editor but when running the program the same old error message is still there and instead of the graph there is just a flat gray empty panel. Even if the UI Editor draws the graph is still gives two errors:
1) Field VERTICAL_ABSOLUTE_AREA not found in class oracle.jbo.uicli.jui.JUSingleTableGraphBinding
2) Method getInstance not found in class oracle.jbo.uicli.jui.JUSingleTableGraphBinding
which however doesn't stop the program from compiling???
Could there be some kind of version conflict? My JDeveloper version is 9.0.2 and J2SE version is 1.4.0. Is there any use trying to solve this problem before I have moved to 9.0.3 and 1.4.1?
In my JClient controls palette (or any other palette) I couldn't find any dataPanel, just JUImageControl, JULabel, JUNavigationBar, JURadioButtonGroupPanel, JUStatusBar and OrdMediaControl. Of course in Swing containers there is JPanel but I guess you didn't mean that, did you?
Just to be sure I ask if "Create a simple EMP FORM" meant that I had to select "New | JClient Objects | JClient Form", which creates a new JFrame based class? I did that, and added wizard-created graph panel to the form but as I told the result was no good.
- Risto -
Hi,
I am haviing a crystal report problem. The problem relates to a one-to-many relationship involving two tables.
I have a similar setup to the following:
I have 2 database tables: table1 & table2
table1 consists of 3 fields:
{id#}, {yes/no},{up/down}
table2 consists of 2 fields:
{id#},
the field can contain any of the following values: 'open', 'closed', 'final', 'complete'.
The problem is that there exist many states to one id#.
I have a bar graph in my report that displays a bar for the count of the{yes/no} field and a bar for the count of the {up/down} field. I want also a bar for the count of when the field = 'final'.
What happens when I write a formula for the field in the second table and place it in the 'show values' section of the chart expert, is the count displayed in each bar on the graph increases significantly. I am assuming this is because there are multiple records in table 2 for each record in table 1.
What I want to happen is that the graph displays bar 1 and bar 2 correctly and then when I put in the formula for the third bar, it simply displays that bar with the count for when the field = 'final'. I dont want it to affect the whole garph.
Has anyone got any suggestions on how I can do this?
I have tried messing around with the distinct records setting in crystal and also by writing an sql query specifying DISTINCT keyword instead of using the select expert, but to no avail.
Please please can someone help me with this issue.
Thank you.
JYou can add a 1-1 query key through the code API in a descriptor amendment method. You could also define a selection criteria on the 1-m mapping to filter the type=2.
Example: (see Foundation Library manual 8-17)
OneToOneQueryKey queryKey = new OneToOneQueryKey();
queryKey.setName("organization");
queryKey.setReferenceClass(Organization.class);
ExpressionBuilder builder = new ExpressionBuilder();
queryKey.setJoinCriteria(builder.getField("ORGANIZATION.ORG_ID").equal(builder.getParameter("RELATIONSHIP.PARENT_ID").and(builder.getParamater("RELATIONSHIP.RELATIONSHIP_TYPE").equal(2)));
relationDescriptor.addQueryKey(queryKey);
Example: (of 1-m mapping with selection criteria)
OneToManyMapping mapping = new OneToManyMapping();
mapping.setReferenceClass(Relation.class);
mapping.setTargetForeignKey("RELATION.PARENT_ID");
ExpressionBuilder builder = new ExpressionBuilder();
mapping.setSelectionCriteria(builder.getField("RELATIONSHIP.PARENT_ID").equal(builder.getParameter("ORGANIZATION.ORG_ID").and(builder.getField("RELATIONSHIP.RELATIONSHIP_TYPE").equal(2)));
orgDescriptor.addMapping(mapping); -
ITunes has a problem finding my iPhone on wifi after iOS 6 update
Since updating to iOS 6 on Thursday, I've been having problems with iTunes not finding my iPhone on wifi. I'm not having this problem with my iPad, which is first gen so no iOS update. Sometimes the phone will show up on the list when I start iTunes, most of the time it won't. I am also getting repeated pop-ups from Windows telling me that "ATH.exe has stopped working". The pop up shows up even after I click the button for "Close Program". I've tried stopping and starting the Apple Mobile Device Service. This led to the phone showing up on the list but the pop up frequency has actually now increased (not that that's necessarily related).
I do not have problems with the phone showing up in the list or syncing the phone when it's physically connected - it works exactly the way it's supposed to if it's plugged in. And I can deal with having to plug it in to sync if I have to but these constant popups are starting to drive me batty and I don't want to have to deal with them until the new iTunes comes out next month (assuming the new version will fix whatever the problem is anyway).
I am running Windows Vista 32-bit, iTunes 10.7.0.21, iPhone 3GS.I've got the 4S and I see you have the 3GS; this isn't a device issue evidently since your post is the first that I see is NOT a newer device. I'm in total agreement on your post as well - there is absolutely no rhyme nor reason for all this and the pop-up is to the point of syncing via the cable is worth NOT having this "ATH.exe" error.
Further I have uninstalled and reinstalled everything, as per all the support forums, yet to sync via WiFi, I have to stop and start the Apple Device Service countless times. As I stated earlier, by the time I start/restart the services, it's just easier to throw it on the cable and call it a day....
One would think, by now, that Apple would be on this however I hve yet to see an Apple post as to a resolution. I suppose we will just go batty together!!! If I hear or find anything, I'll hunt down this post and post the info I've found. Thank you for reporting this so Apple realizes we're not losing our minds nor is it a Vista/Windows issue. iTunes10.7.0.21 is being used & this only started after the iOS 6 update... GRRR!!!! -
i have a problem in graph wizard in reports 10g
when i want do display more than 3 diferent data in plot areao of graph wizard only first 3 rows can be seen and adjusted, others can not.
is there a way to see and adjust more then 3 rows in plot area?
Thanks,
RadeHi,
Not directly. You have to edit graph.xml file (in property pane of your graph). Some details about this file you can get from How to... topics on Products page
have a good day
Daniel
Maybe you are looking for
-
BEX64 error after updating to CC 2014.1
I have Premiere Pro CC 2014 in my office, then 2014.1 was release so I was excited to upgrade. Then every project I opened crashes with BEX64 error. Is My specs or something? Intel Core i7 4770 16gb RAM Intel HD Graphics 4600 please email me at : [e
-
Help b noir?! iTunes won't open
Hi b noir, I've been lurking here for days because I updated iTunes over a week ago and it won't open. I've read several of your suggestions and none seem to fit my situation. So, I thought I'd give it a shot to see if you can help. I get an error ms
-
Using common SOAP Sender Communication Channel.
Hi, Env: PI 7.1 Scenario: Same SOAP Sender communication channel is used in more than one scenario. Properties "Use Encoded Headers" and "Use Query Strings" are checked. Problem: SOAP channel is getting binded with the first interface/call. Subsequen
-
How do I get tbird to open in full window screen, ie maximize
I asked this before and deleted message because the solution worked. However, the solution only worked for that one day. I reopened today and the window size is again at 'normal' and I do not remember how to fix this so tbird is at FULL screen on my
-
How to change IM text box from right side to botto...
During a video call with most of my contacts, the IM text box is below the video box and at the bottom of the screen. However, when my son calls (on new Samsung S5) the IM text box is to the right of the video box and on the right side of my screen.