Questions tagged [multiplicity]

In mathematics, the multiplicity of a member of a multiset is the number of times it appears in the multiset. For example, the number of times a given polynomial has a root at a given point is the multiplicity of that root.

77 questions
0
votes
0 answers

Mysql. How to select records with mutiple parameters (logical AND)

I have 2 tables. One table keeps data name parameters, the second table has relation many-to-many. I want to select records which have entrance in multiplicity (logical AND). All I have written is filtering by logical OR. I wrote something like…
0
votes
2 answers

Multiplicity with Predicates

So I have the following: some sig Person { friends : set Person } fact TransitiveForThree { one p1, p2, p3 : Person { p1 in p2.friends && p2 in p3.friends => p1 in p3.friends } } The idea is that I want there to exist a set of…
SirGoose
  • 131
  • 1
  • 2
  • 7
0
votes
1 answer

Inverse parent-child relationship in Visio E-R Model

I was trying to make a simple E-R model with Microsoft Visio 2010. The problem is, I want a "one-to-many" relationship between the "RealEstateCompanies" entity and the "Agents" entity. However, I am not able to do this. As is shown in the first…
0
votes
1 answer

How to implement numeric multiplicities like 1..3 in SQL Server

I haven't been able to figure out how to implement unconventional multiplicities such as 1..3 or 5..15 in SQL Server. I've can implement 0..1, 1..1, 0..* and 1..*. Now I to enforce a constraint a Trio entity must be associated with at least one…
Bob
  • 1
  • 1
0
votes
1 answer

Creating a dictionary whose keys give multiplicities of the values occurring in an array of an array

I have this: array1 = [[1,2,3],[1,2,3],[2,1,3],[2,1,3],[1,-2,3]] array2 = [[1,2,3],[1,2,3],[1,2,3],[1,2,3],[0,2,3],[2,1,3]] and want to create this: multiArray1 = {[1,2,3]:2, [2,1,3]:2} multiArray2 = {[1,2,3]:4, [2,1,3]:1} Question: I am trying…
Mee Seong Im
  • 131
  • 1
  • 8
0
votes
1 answer

Aggregation + Multiplicity UML Clarification

I don't understand what the hollow diamond next to Class A together with the multiplicity next to Class B implies about the relationship between Class A and B. Could someone clarify this for me?
0
votes
1 answer

Multiplicity in Entity Framework

I'm new to Entity Framework and I've run into some problems while trying to implement my ERD Code First. The situation is as follows: ERD A product has a group of questions (QuestionGroup). A QuestionGroup has multiple questions and can belong to…
Flippey
  • 91
  • 1
  • 8
0
votes
1 answer

Select items around a value in a sorted list with multiple repeated values

I'm trying to select some elements in a python list. The list represents a distribution of the sizes of some other elements, so it contains multiple repeated values. After I find the average value on this list, I want to pick those elements which…
0
votes
1 answer

Double foreign key: multiplicity error in C#

I have a Entity framework set of Auctions. Every auctions has a 2 foreign key to the User DB object. [the creator (required) and the current winner (optional)] .... public class UserDB { [Key] public int Id { get; set; } public…
Kay90
  • 63
  • 1
  • 1
  • 5
0
votes
3 answers

Array method that returns a new array where every number is replicated by “itself” # of times

I am trying to write a method in Java that receives an array and returns a new array where each number is printed that number of times. Here is an example input and output: "1 2 3 0 4 3" ---> "1 2 2 3 3 3 4 4 4 4 3 3 3". I am stuck and my program…
Bill
  • 25
  • 2
  • 9
0
votes
1 answer

Multiplicity constraint violated. The role 'Contract_Subscription_Target' of the relationship 'Contract_Subscription' has multiplicity 1 or 0..1

Im trying to save some objects to the database when I get the error above. All I have googled and searched has not yet resulted in something useful, therefore the question here. The code where it goes wrong: foreach (Contract con in…
Gijs Kuijer
  • 80
  • 2
  • 7
0
votes
1 answer

Multiplicity Relationship for UML Diagram

So I have this question, which I have been stuck on for some time. I have to draw a relationship based on some business rules and include the multiplicities as well. The question is as follows: A movie either has one star, two co-stars, or more than…
amias
  • 33
  • 5
0
votes
2 answers

ArrayList or Aggregation with specified multiplicity

I am just starting with UML (StarUML 5) so please excuse this really basic question. Let's say a Person has multiple Characteristics, each of which has a Name and a Value. (This is just to keep things simple.) Suppose I create the Characteristic…
Aharon
  • 1
  • 1
0
votes
1 answer

About Multiplicity in Model first: Does Many mean '0..*' or '1..*'?

I'm new to database and Entity Framwork, when I use Model first to build a database, there are three choices, so here Many means 0..* or 1..* ? If a relationship is one to many, here Many is kind of 0..* , does it mean a foreign key here is…
0
votes
1 answer

rails associations with multiplicity

The question is: how to represent a multiplicity in Ruby on Rails associations? Suppose I have two models - Collection and Item. They are in has_and_belongs_to_many relations. If a collection contains multiple identical instances of items (say, it…
Andrew
  • 2,148
  • 5
  • 23
  • 34